From 4afe43ada1fc87ddae5bbd15562af5214b55526f Mon Sep 17 00:00:00 2001 From: Grant Passmore Date: Wed, 15 Feb 2023 16:15:27 -0600 Subject: [PATCH 1/7] feat(nb/conflict-detection): add a new `conflict-detection` notebook solving Sonatus's concurrent resource access conflict problems --- notebooks-src/imandra-conflict-detection.md | 2045 +++++++++++++++++++ 1 file changed, 2045 insertions(+) create mode 100644 notebooks-src/imandra-conflict-detection.md diff --git a/notebooks-src/imandra-conflict-detection.md b/notebooks-src/imandra-conflict-detection.md new file mode 100644 index 00000000..c0187066 --- /dev/null +++ b/notebooks-src/imandra-conflict-detection.md @@ -0,0 +1,2045 @@ +# Imandra for automated conflict detection + +In this notebook, we will build an Imandra framework for reasoning about concurrent conflict detection. Once we encode this model in Imandra, we'll be able to use Imandra to automatically solve arbitrary problems about concurrent resource detection simply by encoding them in a simple datatype and asking Imandra if a conflict is possible. + +Let's begin with an informal description of the problem space. + +# Detecting resource conflicts over concurrent workflows + +Imagine there are two workflows, WF1 and WF2, that can each access Sharable and Unsharable resources. + +We define a conflict as any possible scenario in which WF1 and WF2 both access +an Unsharable resource at the same time. + +We want to prove that, for given definitions, a specific sequence of events will either +never lead to a conflict OR that there will be a conflict and at which event +would the conflict occur. + +We will + +## Imagine we have the following work-flows + +### WF1 +``` +A -> B -> C -> A +``` + +### WF2 +``` +D -> E -> F -> D +``` + +## Now, consider the following motivating problems + +### Problem 1 + +Assume that we have the following definitions: + +Node A +- Starts when `Sensor == 1` +- Accesses `Apple` + +Node B +- Starts when `Sensor == 2` +- Accesses `Banana` + +Node C +- Starts when `Sensor == 3` +- Accesses `Orange` + +Node D +- Starts when `Sensor == 1` +- Accesses `Orange` + +Node E +- Starts when `Sensor == 2` +- Accesses `Banana` + +Node F +- Starts when `Sensor == 3` +- Accesses `Apple` + +### Problem 1A +Suppose that we define our resources as such: + +Resources +- Apple: `Sharable` +- Banana: `Unsharable` +- Orange: `Sharable` + +If the following sequence of events is seen: +1. `Sensor = 1` (`WF1 -> A`) (`WF2 -> D`) +2. `Sensor = 2` (`WF1 -> B`) (`WF2 -> E`) + +Then `B` and `E` will access `Banana` (which is an Unsharable resource) at the same time, and there exists a sequence of events such that **a conflict is possible**. + +### Problem 1B +Suppose that we now define our resources as such: + +Resources +- Apple: `Unsharable` +- Banana: `Sharable` +- Orange: `Sharable` + +Then there is **no such sequence of events such that a conflict is possible**. + +### Problem 1C +Suppose we keep the resource definition as in 1B but now change the definition of the Nodes to be: + +Node D +- Starts when `Sensor == 1` OR `Sensor == 2` + +Node E +- Starts when `Sensor == 2` OR `Sensor == 3` + +Node F +- Starts when `Sensor == 3` OR `Sensor == 1` +- Accesses `Apple` + +If the following sequence of events is seen: +1. `Sensor = 2` (`WF2 -> D`) +2. `Sensor = 3` (`WF2 -> E`) +3. `Sensor = 1` (`WF2 -> F`) (`WF1 -> A`) + +Then `F` and `A` will access `Apple` (which is an Unsharable resource) at the same time, and there exists a sequence of events such that **a conflict is possible**. + +# Let's now build a framework in Imandra to allow us to answer these questions automatically + +We'll start with defining *agents*, *resources*, *guards* and *policies*. + + +```ocaml +type agent_id = + | Node of node_id + +and node_id = + A | B | C | D | E | F + +type guard = + | Eq of sensor * int + | Or of guard * guard + +and sensor = + | Sensor + +type resource = + | Apple + | Banana + | Orange + +type sharability = + | Sharable + | Unsharable + +type policy = + (resource, sharability) Map.t +``` + + + + + type agent_id = Node of node_id + and node_id = A | B | C | D | E | F + type guard = Eq of sensor * Z.t | Or of guard * guard + and sensor = Sensor + type resource = Apple | Banana | Orange + type sharability = Sharable | Unsharable + type policy = (resource, sharability) Map.t + + + + +# Problems + +Next, we'll define the *problem* datatype, which will allow us to succinctly express an arbitrary conflict detection problem of the above form to Imandra for analysis. + +As above, a problem will consist of a pair of workflows, a collection of agents (each with their own identities, guards and resource accesses) and a resource access policy specifying which resources can be shared. + + +```ocaml +type problem = { + work_flow_1: work_flow; + work_flow_2: work_flow; + agents: agent list; + policy: policy; +} + +and work_flow = node_id list + +and agent = { + agent_id: agent_id; + guard: guard; + accesses: resource; +} +``` + + + + + type problem = { + work_flow_1 : work_flow; + work_flow_2 : work_flow; + agents : agent list; + policy : policy; + } + and work_flow = node_id list + and agent = { agent_id : agent_id; guard : guard; accesses : resource; } + + + + +# Operational Semantics + +Next, we're going to encode the "meaning" or "semantics" of concurrent conflicts in Imandra by defining an *interpreter* which evaluates a problem over arbitrary states of the world. Then, we'll be able to use Imandra's symbolic reasoning power to prove or disprove the existence of a conflict for a given problem by asking it to symbolically evaluate all possible behaviors of the interpreter over a given problem specification. + +## State + +The `state` datatype will encode the current state of the world. This is core datatype over which a problem execution trace will take place. + +## Interpreter + +Armed with the `state` type, we will define an interpreter which accepts a problem and a sequence of sensor readings, and yields the result. + + +```ocaml +(* The current state of the world *) + +type state = { + wf_1: work_flow; + wf_2: work_flow; + sensor: int option; + agents: (node_id, agent option) Map.t; + policy: policy; + conflict: (agent_id * agent_id * resource) option; +} + +let rec eval_guard (sensor:int) (g:guard) = + match g with + | Eq (Sensor, n) -> sensor = n + | Or (g1, g2) -> + eval_guard sensor g1 || eval_guard sensor g2 + +let step (s:state) (sensor:int) = + let in_conflict r1 r2 policy = + r1 = r2 && Map.get r1 policy = Unsharable + in + match s.wf_1, s.wf_2 with + | agent_1 :: wf_1', agent_2 :: wf_2' -> + begin match Map.get agent_1 s.agents, Map.get agent_2 s.agents with + | Some actor_1, Some actor_2 -> + let g_1, g_2 = eval_guard sensor actor_1.guard, + eval_guard sensor actor_2.guard in + if g_1 && g_2 && in_conflict actor_1.accesses actor_2.accesses s.policy then ( + { s with + sensor = Some sensor; + conflict = Some (Node agent_1, Node agent_2, actor_1.accesses); + } + ) else ( + { s with + sensor = Some sensor; + wf_1 = if g_1 then wf_1' else s.wf_1; + wf_2 = if g_2 then wf_2' else s.wf_2; + } + ) + | _ -> s + end + | _ -> s + +let rec run (s:state) (sensors:int list) = + match sensors with + | [] -> (s, []) + | sensor :: sensors -> + let s' = step s sensor in + if s'.conflict = None then ( + run s' sensors + ) else ( + (s', sensors) + ) +[@@adm sensors] +``` + + + + + type state = { + wf_1 : work_flow; + wf_2 : work_flow; + sensor : Z.t option; + agents : (node_id, agent option) Map.t; + policy : policy; + conflict : (agent_id * agent_id * resource) option; + } + val eval_guard : Z.t -> guard -> bool = + val step : state -> Z.t -> state = + val run : state -> Z.t list -> state * Z.t list = + + + + + +
termination proof

Termination proof

call `eval_guard sensor (Destruct(Or, 0, g))` from `eval_guard sensor g`
original:eval_guard sensor g
sub:eval_guard sensor (Destruct(Or, 0, g))
original ordinal:Ordinal.Int (_cnt g)
sub ordinal:Ordinal.Int (_cnt (Destruct(Or, 0, g)))
path:[not Is_a(Eq, g)]
proof:
detailed proof
ground_instances:3
definitions:0
inductions:0
search_time:
0.010s
details:
Expand
smt_stats:
num checks:8
arith assert lower:11
arith tableau max rows:6
arith tableau max columns:19
arith pivots:10
rlimit count:5434
mk clause:24
datatype occurs check:27
mk bool var:117
arith assert upper:8
datatype splits:9
decisions:19
arith row summations:10
propagations:19
conflicts:6
arith fixed eqs:4
datatype accessor ax:18
arith conflicts:2
arith num rows:6
datatype constructor ax:31
num allocs:23853164
final checks:6
added eqs:97
del clause:7
arith eq adapter:6
memory:17.130000
max memory:17.130000
Expand
  • start[0.010s]
    +  let (_x_0 : int) = count.guard g in
    +  let (_x_1 : guard) = Destruct(Or, 0, g) in
    +  let (_x_2 : int) = count.guard _x_1 in
    +  let (_x_3 : bool) = Is_a(Eq, _x_1) in
    +  not Is_a(Eq, g) && ((_x_0 >= 0) && (_x_2 >= 0))
    +  ==> (_x_3
    +       && not (not (eval_guard sensor (Destruct(Or, 0, _x_1))) && not _x_3))
    +      || Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
  • simplify
    into:
    let (_x_0 : int) = count.guard g in
    +let (_x_1 : guard) = Destruct(Or, 0, g) in
    +let (_x_2 : int) = count.guard _x_1 in
    +let (_x_3 : bool) = Is_a(Eq, _x_1) in
    +not (not Is_a(Eq, g) && (_x_0 >= 0) && (_x_2 >= 0))
    +|| Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
    +|| (_x_3 && not (not (eval_guard sensor (Destruct(Or, 0, _x_1))) && not _x_3))
    expansions:
    []
    rewrite_steps:
      forward_chaining:
      • unroll
        expr:
        (|Ordinal.<<| (|Ordinal.Int_79/boot|
        +                (|count.guard_1263/client| (|get.Or.0_549/serve…
        expansions:
        • unroll
          expr:
          (|count.guard_1263/client| (|get.Or.0_549/server| g_552/server))
          expansions:
          • unroll
            expr:
            (|count.guard_1263/client| g_552/server)
            expansions:
            • Unsat
            call `eval_guard sensor (Destruct(Or, 1, g))` from `eval_guard sensor g`
            original:eval_guard sensor g
            sub:eval_guard sensor (Destruct(Or, 1, g))
            original ordinal:Ordinal.Int (_cnt g)
            sub ordinal:Ordinal.Int (_cnt (Destruct(Or, 1, g)))
            path:[not (eval_guard sensor (Destruct(Or, 0, g))) && not Is_a(Eq, g)]
            proof:
            detailed proof
            ground_instances:3
            definitions:0
            inductions:0
            search_time:
            0.012s
            details:
            Expand
            smt_stats:
            num checks:8
            arith assert lower:11
            arith tableau max rows:6
            arith tableau max columns:19
            arith pivots:10
            rlimit count:2742
            mk clause:24
            datatype occurs check:27
            mk bool var:118
            arith assert upper:8
            datatype splits:9
            decisions:19
            arith row summations:10
            propagations:19
            conflicts:6
            arith fixed eqs:4
            datatype accessor ax:18
            arith conflicts:2
            arith num rows:6
            datatype constructor ax:31
            num allocs:17118784
            final checks:6
            added eqs:97
            del clause:7
            arith eq adapter:6
            memory:17.130000
            max memory:17.130000
            Expand
            • start[0.012s]
              +  let (_x_0 : int) = count.guard g in
              +  let (_x_1 : guard) = Destruct(Or, 1, g) in
              +  let (_x_2 : int) = count.guard _x_1 in
              +  let (_x_3 : bool) = Is_a(Eq, _x_1) in
              +  not (eval_guard sensor (Destruct(Or, 0, g)))
              +  && (not Is_a(Eq, g) && ((_x_0 >= 0) && (_x_2 >= 0)))
              +  ==> (_x_3
              +       && not (not (eval_guard sensor (Destruct(Or, 0, _x_1))) && not _x_3))
              +      || Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
            • simplify
              into:
              let (_x_0 : guard) = Destruct(Or, 1, g) in
              +let (_x_1 : bool) = Is_a(Eq, _x_0) in
              +let (_x_2 : int) = count.guard _x_0 in
              +let (_x_3 : int) = count.guard g in
              +(_x_1 && not (not (eval_guard sensor (Destruct(Or, 0, _x_0))) && not _x_1))
              +|| Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_3)
              +|| not
              +   (not (eval_guard sensor (Destruct(Or, 0, g))) && not Is_a(Eq, g)
              +    && (_x_3 >= 0) && (_x_2 >= 0))
              expansions:
              []
              rewrite_steps:
                forward_chaining:
                • unroll
                  expr:
                  (|Ordinal.<<| (|Ordinal.Int_79/boot|
                  +                (|count.guard_1263/client| (|get.Or.1_550/serve…
                  expansions:
                  • unroll
                    expr:
                    (|count.guard_1263/client| (|get.Or.1_550/server| g_552/server))
                    expansions:
                    • unroll
                      expr:
                      (|count.guard_1263/client| g_552/server)
                      expansions:
                      • Unsat
                      + + + + +
                      termination proof

                      Termination proof

                      call `run (step s (List.hd sensors)) (List.tl sensors)` from `run s sensors`
                      original:run s sensors
                      sub:run (step s (List.hd sensors)) (List.tl sensors)
                      original ordinal:Ordinal.Int (_cnt sensors)
                      sub ordinal:Ordinal.Int (_cnt (List.tl sensors))
                      path:[(step s (List.hd sensors)).conflict = None && sensors <> []]
                      proof:
                      detailed proof
                      ground_instances:3
                      definitions:0
                      inductions:0
                      search_time:
                      0.017s
                      details:
                      Expand
                      smt_stats:
                      num checks:8
                      arith assert lower:12
                      arith tableau max rows:5
                      arith tableau max columns:16
                      arith pivots:13
                      rlimit count:17922
                      mk clause:204
                      datatype occurs check:299
                      mk bool var:1203
                      arith assert upper:14
                      datatype splits:309
                      decisions:456
                      arith row summations:23
                      arith bound prop:1
                      propagations:523
                      conflicts:28
                      arith fixed eqs:5
                      datatype accessor ax:153
                      minimized lits:2
                      arith conflicts:2
                      arith num rows:5
                      arith assert diseq:2
                      datatype constructor ax:702
                      num allocs:33535690
                      final checks:14
                      added eqs:2994
                      del clause:9
                      arith eq adapter:13
                      memory:18.150000
                      max memory:18.150000
                      Expand
                      • start[0.017s]
                        +  let (_x_0 : bool) = Is_a(Some, …) in
                        +  let (_x_1 : bool) = s.wf_1 <> [] in
                        +  let (_x_2 : bool) = s.wf_2 <> [] in
                        +  let (_x_3 : int) = count.list mk_nat sensors in
                        +  let (_x_4 : int list) = List.tl sensors in
                        +  let (_x_5 : int) = count.list mk_nat _x_4 in
                        +  let (_x_6 : state) = if _x_2 then … else s in
                        +  ((if _x_2 then if _x_1 then if _x_0 then … else s else s else s).conflict
                        +   = None)
                        +  && (sensors <> [] && ((_x_3 >= 0) && (_x_5 >= 0)))
                        +  ==> not
                        +      (((if _x_6.wf_2 <> []
                        +         then if ….wf_1 <> [] then if _x_0 then … else … else _x_6
                        +         else if _x_2 then if _x_1 then … else s else s).conflict
                        +        = None)
                        +       && _x_4 <> [])
                        +      || Ordinal.( << ) (Ordinal.Int _x_5) (Ordinal.Int _x_3)
                      • simplify
                        into:
                        let (_x_0 : int list) = List.tl sensors in
                        +let (_x_1 : int) = count.list mk_nat _x_0 in
                        +let (_x_2 : int) = count.list mk_nat sensors in
                        +let (_x_3 : bool) = s.wf_1 <> [] in
                        +let (_x_4 : bool) = s.wf_2 <> [] in
                        +let (_x_5 : state) = if _x_4 then … else s in
                        +let (_x_6 : bool) = Is_a(Some, …) in
                        +Ordinal.( << ) (Ordinal.Int _x_1) (Ordinal.Int _x_2)
                        +|| not
                        +   (((if _x_5.wf_2 <> []
                        +      then if ….wf_1 <> [] then if _x_6 then … else … else _x_5
                        +      else if _x_4 then if _x_3 then … else s else s).conflict
                        +     = None)
                        +    && _x_0 <> [])
                        +|| not
                        +   (((if _x_4 then if _x_3 then if _x_6 then … else s else s else s).conflict
                        +     = None)
                        +    && sensors <> [] && (_x_2 >= 0) && (_x_1 >= 0))
                        expansions:
                        []
                        rewrite_steps:
                          forward_chaining:
                          • unroll
                            expr:
                            (|Ordinal.<<| (|Ordinal.Int_79/boot|
                            +                (|count.list_702/server|
                            +                  (|ge…
                            expansions:
                            • unroll
                              expr:
                              (|count.list_702/server| (|get.::.1_684/server| sensors_690/server))
                              expansions:
                              • unroll
                                expr:
                                (|count.list_702/server| sensors_690/server)
                                expansions:
                                • Unsat
                                + + + +# Top-level problem interpreter and problem-specific conflict detection + +Next, we'll add the ability to define problems, run them and detect conflicts. + + +```ocaml +let rec mk_agents_map actors = + let agent_name = function Node a -> a in + match actors with + | [] -> Map.const None + | agent :: agents -> + Map.add (agent_name agent.agent_id) (Some agent) (mk_agents_map agents) + +(* Run a problem along sensor readings *) + +let run_problem (p:problem) sensors = + let init_state = { + wf_1 = p.work_flow_1; + wf_2 = p.work_flow_2; + sensor = None; + agents = mk_agents_map p.agents; + policy = p.policy; + conflict = None; + } in + run init_state sensors + +(* Is a conflict reachable from an initial state? *) + +let conflict_reachable ?(k=5) (p:problem) sensors = + let sensors = List.take k sensors in + let (s, sensors_left) = run_problem p sensors in + (s.conflict <> None && sensors_left = []) + +(* Make a policy from a list of declarations *) + +let mk_policy xs = + Map.of_list ~default:Sharable xs +``` + + + + + val mk_agents_map : agent list -> (node_id, agent option) Map.t = + val run_problem : problem -> Z.t list -> state * Z.t list = + val conflict_reachable : ?k:Z.t -> problem -> Z.t list -> bool = + val mk_policy : ('a * sharability) list -> ('a, sharability) Map.t = + + + + + +
                                termination proof

                                Termination proof

                                call `mk_agents_map (List.tl actors)` from `mk_agents_map actors`
                                original:mk_agents_map actors
                                sub:mk_agents_map (List.tl actors)
                                original ordinal:Ordinal.Int (_cnt actors)
                                sub ordinal:Ordinal.Int (_cnt (List.tl actors))
                                path:[actors <> []]
                                proof:
                                detailed proof
                                ground_instances:3
                                definitions:0
                                inductions:0
                                search_time:
                                0.012s
                                details:
                                Expand
                                smt_stats:
                                num checks:8
                                arith assert lower:17
                                arith tableau max rows:10
                                arith tableau max columns:24
                                arith pivots:13
                                rlimit count:3758
                                mk clause:38
                                datatype occurs check:25
                                mk bool var:187
                                arith assert upper:12
                                datatype splits:21
                                decisions:35
                                arith row summations:34
                                propagations:32
                                conflicts:11
                                arith fixed eqs:9
                                datatype accessor ax:30
                                minimized lits:1
                                arith conflicts:2
                                arith num rows:10
                                datatype constructor ax:71
                                num allocs:81608215
                                final checks:6
                                added eqs:222
                                del clause:15
                                arith eq adapter:12
                                memory:19.050000
                                max memory:19.050000
                                Expand
                                • start[0.012s]
                                  +  let (_x_0 : int) = count.list count.agent actors in
                                  +  let (_x_1 : agent list) = List.tl actors in
                                  +  let (_x_2 : int) = count.list count.agent _x_1 in
                                  +  actors <> [] && ((_x_0 >= 0) && (_x_2 >= 0))
                                  +  ==> not (_x_1 <> [])
                                  +      || Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
                                • simplify
                                  into:
                                  let (_x_0 : agent list) = List.tl actors in
                                  +let (_x_1 : int) = count.list count.agent _x_0 in
                                  +let (_x_2 : int) = count.list count.agent actors in
                                  +not (_x_0 <> []) || Ordinal.( << ) (Ordinal.Int _x_1) (Ordinal.Int _x_2)
                                  +|| not (actors <> [] && (_x_2 >= 0) && (_x_1 >= 0))
                                  expansions:
                                  []
                                  rewrite_steps:
                                    forward_chaining:
                                    • unroll
                                      expr:
                                      (|Ordinal.<<| (|Ordinal.Int_79/boot|
                                      +                (|count.list_931/server|
                                      +                  (|ge…
                                      expansions:
                                      • unroll
                                        expr:
                                        (|count.list_931/server| (|get.::.1_917/server| actors_920/server))
                                        expansions:
                                        • unroll
                                          expr:
                                          (|count.list_931/server| actors_920/server)
                                          expansions:
                                          • Unsat
                                          + + + +# Now, let's encode some problems and check for conflicts! + +# Problem 1 + + +```ocaml +let ex_1 = { + work_flow_1 = [A; B; C; A]; + work_flow_2 = [D; E; F; D]; + agents=[ + + {agent_id=Node A; + guard=Eq(Sensor, 1); + accesses=Apple}; + + {agent_id=Node B; + guard=Eq(Sensor, 2); + accesses=Banana}; + + {agent_id=Node C; + guard=Eq(Sensor, 3); + accesses=Orange}; + + {agent_id=Node D; + guard=Eq(Sensor, 1); + accesses=Orange}; + + {agent_id=Node E; + guard=Eq(Sensor, 2); + accesses=Banana}; + + {agent_id=Node F; + guard=Eq(Sensor, 3); + accesses=Apple}; + + ]; + policy=(mk_policy + [(Apple, Sharable); + (Banana, Unsharable); + (Orange, Sharable)]); +} +``` + + + + + val ex_1 : problem = + {work_flow_1 = [A;B;C;A]; work_flow_2 = [D;E;F;D]; + agents = + [{agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}; + {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}; + {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}; + {agent_id = Node D; guard = Eq (Sensor, 1); accesses = Orange}; + {agent_id = Node E; guard = Eq (Sensor, 2); accesses = Banana}; + {agent_id = Node F; guard = Eq (Sensor, 3); accesses = Apple}]; + policy = (Map.of_list ~default:Sharable [(Banana, Unsharable)])} + + + + +# Is a conflict possible? Let's ask Imandra! + + +```ocaml +instance (fun sensors -> conflict_reachable ex_1 sensors) +``` + + + + + - : Z.t list -> bool = + module CX : sig val sensors : Z.t list end + + + + + +
                                          Instance (after 21 steps, 0.058s):
                                          +let sensors : int list = [1; 2]
                                          +
                                          + + + + +
                                          Instance
                                          proof attempt
                                          ground_instances:21
                                          definitions:0
                                          inductions:0
                                          search_time:
                                          0.058s
                                          details:
                                          Expand
                                          smt_stats:
                                          array def const:2
                                          num checks:43
                                          array sel const:35
                                          array def store:141
                                          array exp ax2:259
                                          array splits:54
                                          rlimit count:91407
                                          array ext ax:29
                                          mk clause:812
                                          array ax1:9
                                          datatype occurs check:4619
                                          mk bool var:5169
                                          array ax2:345
                                          datatype splits:861
                                          decisions:3346
                                          propagations:2379
                                          conflicts:156
                                          datatype accessor ax:271
                                          minimized lits:19
                                          datatype constructor ax:2316
                                          num allocs:105225016
                                          final checks:159
                                          added eqs:16592
                                          del clause:579
                                          time:0.002000
                                          memory:21.750000
                                          max memory:21.800000
                                          Expand
                                          • start[0.058s]
                                            +  let (_x_0 : (state * int list))
                                            +      = run
                                            +        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                            +         conflict = …}
                                            +        (List.take … ( :var_0: ))
                                            +  in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                          • simplify

                                            into:
                                            let (_x_0 : (state * int list))
                                            +    = run
                                            +      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                            +       conflict = …}
                                            +      (List.take 5 ( :var_0: ))
                                            +in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                            expansions:
                                            []
                                            rewrite_steps:
                                              forward_chaining:
                                              • unroll
                                                expr:
                                                (|List.take_1116/server| 5 sensors_1433/client)
                                                expansions:
                                                • unroll
                                                  expr:
                                                  (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                  +                   (Node_1246/client E_1251/client)
                                                  +   …
                                                  expansions:
                                                  • unroll
                                                    expr:
                                                    (let ((a!1 (|::| A_1247/client
                                                    +                 (|::| B_1248/client
                                                    +                       (|::| C_1…
                                                    expansions:
                                                    • unroll
                                                      expr:
                                                      (let ((a!1 (|::| (tuple_mk_1101/server Apple_1272/client Sharable_1278/client)
                                                      +                 (|::…
                                                      expansions:
                                                      • unroll
                                                        expr:
                                                        (|List.take_1116/server| 4 (|get.::.1_1084/server| sensors_1433/client))
                                                        expansions:
                                                        • unroll
                                                          expr:
                                                          (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                          +                   (Node_1246/client E_1251/client)
                                                          +   …
                                                          expansions:
                                                          • unroll
                                                            expr:
                                                            (|Map.of_list_1109/server|
                                                            +  Sharable_1278/client
                                                            +  (|::| (tuple_mk_1101/server Banana_1273/client U…
                                                            expansions:
                                                            • unroll
                                                              expr:
                                                              (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                              +                   (Node_1246/client E_1251/client)
                                                              +   …
                                                              expansions:
                                                              • unroll
                                                                expr:
                                                                (|Map.of_list_1109/server|
                                                                +  Sharable_1278/client
                                                                +  (|::| (tuple_mk_1101/server Orange_1274/client S…
                                                                expansions:
                                                                • unroll
                                                                  expr:
                                                                  (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                                  +                   (Node_1246/client E_1251/client)
                                                                  +   …
                                                                  expansions:
                                                                  • unroll
                                                                    expr:
                                                                    (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                                    +                   (Node_1246/client E_1251/client)
                                                                    +   …
                                                                    expansions:
                                                                    • unroll
                                                                      expr:
                                                                      (|Map.of_list_1109/server| Sharable_1278/client |[]|)
                                                                      expansions:
                                                                      • unroll
                                                                        expr:
                                                                        (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                                        +                   (Node_1246/client E_1251/client)
                                                                        +   …
                                                                        expansions:
                                                                        • unroll
                                                                          expr:
                                                                          (mk_agents_map_1408/client
                                                                          +  (|::| (|rec_mk.agent_1091/server|
                                                                          +          (Node_1246/client F_1252/cl…
                                                                          expansions:
                                                                          • unroll
                                                                            expr:
                                                                            (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                                            +                   (Node_1246/client E_1251/client)
                                                                            +   …
                                                                            expansions:
                                                                            • unroll
                                                                              expr:
                                                                              (mk_agents_map_1408/client |[]|)
                                                                              expansions:
                                                                              • unroll
                                                                                expr:
                                                                                (let ((a!1 (|::| A_1247/client
                                                                                +                 (|::| B_1248/client
                                                                                +                       (|::| C_1…
                                                                                expansions:
                                                                                • unroll
                                                                                  expr:
                                                                                  (let ((a!1 (|::| A_1247/client
                                                                                  +                 (|::| B_1248/client
                                                                                  +                       (|::| C_1…
                                                                                  expansions:
                                                                                  • unroll
                                                                                    expr:
                                                                                    (|List.take_1116/server|
                                                                                    +  3
                                                                                    +  (|get.::.1_1084/server| (|get.::.1_1084/server| sensors_1433/client))…
                                                                                    expansions:
                                                                                    • unroll
                                                                                      expr:
                                                                                      (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                                                      +                   (Node_1246/client E_1251/client)
                                                                                      +   …
                                                                                      expansions:
                                                                                      • unroll
                                                                                        expr:
                                                                                        (let ((a!1 (|::| A_1247/client
                                                                                        +                 (|::| B_1248/client
                                                                                        +                       (|::| C_1…
                                                                                        expansions:
                                                                                        • Sat (Some let sensors : int list = [(Z.of_nativeint (1n)); (Z.of_nativeint (2n))] +)
                                                                                        + + + +# Problem 2 + + +```ocaml +(* Example 2 *) + +let ex_2 = { + work_flow_1 = [A; B; C; A]; + work_flow_2 = [D; E; F; D]; + + agents=[ + + {agent_id=Node A; + guard=Eq(Sensor, 1); + accesses=Apple}; + + {agent_id=Node B; + guard=Eq(Sensor, 2); + accesses=Banana}; + + {agent_id=Node C; + guard=Eq(Sensor, 3); + accesses=Orange}; + + {agent_id=Node D; + guard=Eq(Sensor, 1); + accesses=Orange}; + + {agent_id=Node E; + guard=Eq(Sensor, 2); + accesses=Banana}; + + {agent_id=Node F; + guard=Eq(Sensor, 3); + accesses=Apple}; + + ]; + policy=(mk_policy + [(Apple, Unsharable); + (Banana, Sharable); + (Orange, Sharable)]); +} + +``` + + + + + val ex_2 : problem = + {work_flow_1 = [A;B;C;A]; work_flow_2 = [D;E;F;D]; + agents = + [{agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}; + {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}; + {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}; + {agent_id = Node D; guard = Eq (Sensor, 1); accesses = Orange}; + {agent_id = Node E; guard = Eq (Sensor, 2); accesses = Banana}; + {agent_id = Node F; guard = Eq (Sensor, 3); accesses = Apple}]; + policy = (Map.of_list ~default:Sharable [(Apple, Unsharable)])} + + + + +Are conflicts possible? Let's ask Imandra! + + +```ocaml +instance (fun sensors -> conflict_reachable ex_2 sensors) +``` + + + + + - : Z.t list -> bool = + + + + + +
                                                                                        Unsatisfiable
                                                                                        proof
                                                                                        ground_instances:37
                                                                                        definitions:0
                                                                                        inductions:0
                                                                                        search_time:
                                                                                        0.727s
                                                                                        details:
                                                                                        Expand
                                                                                        smt_stats:
                                                                                        array def const:2
                                                                                        num checks:75
                                                                                        array sel const:734
                                                                                        array def store:1594
                                                                                        array exp ax2:2235
                                                                                        array splits:382
                                                                                        rlimit count:3193225
                                                                                        array ext ax:192
                                                                                        mk clause:7686
                                                                                        array ax1:9
                                                                                        datatype occurs check:31464
                                                                                        restarts:5
                                                                                        mk bool var:113837
                                                                                        array ax2:4870
                                                                                        datatype splits:31964
                                                                                        decisions:172099
                                                                                        propagations:116889
                                                                                        conflicts:1173
                                                                                        datatype accessor ax:2542
                                                                                        minimized lits:621
                                                                                        datatype constructor ax:95261
                                                                                        num allocs:186772757
                                                                                        final checks:798
                                                                                        added eqs:601779
                                                                                        del clause:6344
                                                                                        time:0.003000
                                                                                        memory:27.810000
                                                                                        max memory:27.900000
                                                                                        Expand
                                                                                        • start[0.727s]
                                                                                          +  let (_x_0 : (state * int list))
                                                                                          +      = run
                                                                                          +        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                          +         conflict = …}
                                                                                          +        (List.take … ( :var_0: ))
                                                                                          +  in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                        • simplify

                                                                                          into:
                                                                                          let (_x_0 : (state * int list))
                                                                                          +    = run
                                                                                          +      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                          +       conflict = …}
                                                                                          +      (List.take 5 ( :var_0: ))
                                                                                          +in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                          expansions:
                                                                                          []
                                                                                          rewrite_steps:
                                                                                            forward_chaining:
                                                                                            • unroll
                                                                                              expr:
                                                                                              (let ((a!1 (|::| A_1247/client
                                                                                              +                 (|::| B_1248/client
                                                                                              +                       (|::| C_1…
                                                                                              expansions:
                                                                                              • unroll
                                                                                                expr:
                                                                                                (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                +                   (Node_1246/client E_1251/client)
                                                                                                +   …
                                                                                                expansions:
                                                                                                • unroll
                                                                                                  expr:
                                                                                                  (|List.take_1244/server| 5 sensors_1436/client)
                                                                                                  expansions:
                                                                                                  • unroll
                                                                                                    expr:
                                                                                                    (let ((a!1 (|::| (tuple_mk_1229/server Apple_1272/client Unsharable_1279/client)
                                                                                                    +                 (|…
                                                                                                    expansions:
                                                                                                    • unroll
                                                                                                      expr:
                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                      +                   (Node_1246/client E_1251/client)
                                                                                                      +   …
                                                                                                      expansions:
                                                                                                      • unroll
                                                                                                        expr:
                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                        +                   (Node_1246/client E_1251/client)
                                                                                                        +   …
                                                                                                        expansions:
                                                                                                        • unroll
                                                                                                          expr:
                                                                                                          (|List.take_1244/server| 4 (|get.::.1_1212/server| sensors_1436/client))
                                                                                                          expansions:
                                                                                                          • unroll
                                                                                                            expr:
                                                                                                            (|Map.of_list_1237/server|
                                                                                                            +  Sharable_1278/client
                                                                                                            +  (|::| (tuple_mk_1229/server Banana_1273/client S…
                                                                                                            expansions:
                                                                                                            • unroll
                                                                                                              expr:
                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                              +                   (Node_1246/client E_1251/client)
                                                                                                              +   …
                                                                                                              expansions:
                                                                                                              • unroll
                                                                                                                expr:
                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                +                   (Node_1246/client E_1251/client)
                                                                                                                +   …
                                                                                                                expansions:
                                                                                                                • unroll
                                                                                                                  expr:
                                                                                                                  (|Map.of_list_1237/server|
                                                                                                                  +  Sharable_1278/client
                                                                                                                  +  (|::| (tuple_mk_1229/server Orange_1274/client S…
                                                                                                                  expansions:
                                                                                                                  • unroll
                                                                                                                    expr:
                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                    +                   (Node_1246/client E_1251/client)
                                                                                                                    +   …
                                                                                                                    expansions:
                                                                                                                    • unroll
                                                                                                                      expr:
                                                                                                                      (|Map.of_list_1237/server| Sharable_1278/client |[]|)
                                                                                                                      expansions:
                                                                                                                      • unroll
                                                                                                                        expr:
                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                        +                   (Node_1246/client E_1251/client)
                                                                                                                        +   …
                                                                                                                        expansions:
                                                                                                                        • unroll
                                                                                                                          expr:
                                                                                                                          (let ((a!1 (|::| A_1247/client
                                                                                                                          +                 (|::| B_1248/client
                                                                                                                          +                       (|::| C_1…
                                                                                                                          expansions:
                                                                                                                          • unroll
                                                                                                                            expr:
                                                                                                                            (mk_agents_map_1408/client
                                                                                                                            +  (|::| (|rec_mk.agent_1219/server|
                                                                                                                            +          (Node_1246/client F_1252/cl…
                                                                                                                            expansions:
                                                                                                                            • unroll
                                                                                                                              expr:
                                                                                                                              (mk_agents_map_1408/client |[]|)
                                                                                                                              expansions:
                                                                                                                              • unroll
                                                                                                                                expr:
                                                                                                                                (|List.take_1244/server|
                                                                                                                                +  3
                                                                                                                                +  (|get.::.1_1212/server| (|get.::.1_1212/server| sensors_1436/client))…
                                                                                                                                expansions:
                                                                                                                                • unroll
                                                                                                                                  expr:
                                                                                                                                  (let ((a!1 (|::| A_1247/client
                                                                                                                                  +                 (|::| B_1248/client
                                                                                                                                  +                       (|::| C_1…
                                                                                                                                  expansions:
                                                                                                                                  • unroll
                                                                                                                                    expr:
                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                    +                   (Node_1246/client E_1251/client)
                                                                                                                                    +   …
                                                                                                                                    expansions:
                                                                                                                                    • unroll
                                                                                                                                      expr:
                                                                                                                                      (let ((a!1 (|::| A_1247/client
                                                                                                                                      +                 (|::| B_1248/client
                                                                                                                                      +                       (|::| C_1…
                                                                                                                                      expansions:
                                                                                                                                      • unroll
                                                                                                                                        expr:
                                                                                                                                        (let ((a!1 (|::| A_1247/client
                                                                                                                                        +                 (|::| B_1248/client
                                                                                                                                        +                       (|::| C_1…
                                                                                                                                        expansions:
                                                                                                                                        • unroll
                                                                                                                                          expr:
                                                                                                                                          (|List.take_1244/server|
                                                                                                                                          +  2
                                                                                                                                          +  (|get.::.1_1212/server|
                                                                                                                                          +    (|get.::.1_1212/server| (|get.::.1_1212/s…
                                                                                                                                          expansions:
                                                                                                                                          • unroll
                                                                                                                                            expr:
                                                                                                                                            (let ((a!1 (|get.::.0_1211/server|
                                                                                                                                            +             (|get.::.1_1212/server|
                                                                                                                                            +               (|get.::.1_12…
                                                                                                                                            expansions:
                                                                                                                                            • unroll
                                                                                                                                              expr:
                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                              +                   (Node_1246/client E_1251/client)
                                                                                                                                              +   …
                                                                                                                                              expansions:
                                                                                                                                              • unroll
                                                                                                                                                expr:
                                                                                                                                                (let ((a!1 (|get.::.0_1211/server|
                                                                                                                                                +             (|get.::.1_1212/server|
                                                                                                                                                +               (|get.::.1_12…
                                                                                                                                                expansions:
                                                                                                                                                • unroll
                                                                                                                                                  expr:
                                                                                                                                                  (let ((a!1 (|::| A_1247/client
                                                                                                                                                  +                 (|::| B_1248/client
                                                                                                                                                  +                       (|::| C_1…
                                                                                                                                                  expansions:
                                                                                                                                                  • unroll
                                                                                                                                                    expr:
                                                                                                                                                    (let ((a!1 (|get.::.1_1212/server|
                                                                                                                                                    +             (|get.::.1_1212/server|
                                                                                                                                                    +               (|get.::.1_12…
                                                                                                                                                    expansions:
                                                                                                                                                    • unroll
                                                                                                                                                      expr:
                                                                                                                                                      (let ((a!1 (|get.::.1_1212/server|
                                                                                                                                                      +             (|get.::.1_1212/server|
                                                                                                                                                      +               (|get.::.1_12…
                                                                                                                                                      expansions:
                                                                                                                                                      • unroll
                                                                                                                                                        expr:
                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                        +                   (Node_1246/client E_1251/client)
                                                                                                                                                        +   …
                                                                                                                                                        expansions:
                                                                                                                                                        • unroll
                                                                                                                                                          expr:
                                                                                                                                                          (let ((a!1 (|get.::.1_1212/server|
                                                                                                                                                          +             (|get.::.1_1212/server|
                                                                                                                                                          +               (|get.::.1_12…
                                                                                                                                                          expansions:
                                                                                                                                                          • unroll
                                                                                                                                                            expr:
                                                                                                                                                            (let ((a!1 (|::| A_1247/client
                                                                                                                                                            +                 (|::| B_1248/client
                                                                                                                                                            +                       (|::| C_1…
                                                                                                                                                            expansions:
                                                                                                                                                            • unroll
                                                                                                                                                              expr:
                                                                                                                                                              (let ((a!1 (|get.::.1_1212/server|
                                                                                                                                                              +             (|get.::.1_1212/server|
                                                                                                                                                              +               (|get.::.1_12…
                                                                                                                                                              expansions:
                                                                                                                                                              • unroll
                                                                                                                                                                expr:
                                                                                                                                                                (let ((a!1 (|get.::.1_1212/server|
                                                                                                                                                                +             (|get.::.1_1212/server|
                                                                                                                                                                +               (|get.::.1_12…
                                                                                                                                                                expansions:
                                                                                                                                                                • unroll
                                                                                                                                                                  expr:
                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                                  +                   (Node_1246/client E_1251/client)
                                                                                                                                                                  +   …
                                                                                                                                                                  expansions:
                                                                                                                                                                  • unroll
                                                                                                                                                                    expr:
                                                                                                                                                                    (let ((a!1 (|get.::.1_1212/server|
                                                                                                                                                                    +             (|get.::.1_1212/server|
                                                                                                                                                                    +               (|get.::.1_12…
                                                                                                                                                                    expansions:
                                                                                                                                                                    • unroll
                                                                                                                                                                      expr:
                                                                                                                                                                      (let ((a!1 (|::| A_1247/client
                                                                                                                                                                      +                 (|::| B_1248/client
                                                                                                                                                                      +                       (|::| C_1…
                                                                                                                                                                      expansions:
                                                                                                                                                                      • Unsat
                                                                                                                                                                      + + + +# This means no conflicts are possible for Problem 2! + +Imandra has *proved* that this goal is unsatisfiable, i.e., that no such conflict is possible. In fact, we can use Imandra's *verify* command to restate this as a safety property and prove it: + + +```ocaml +verify (fun sensors -> not (conflict_reachable ex_2 sensors)) +``` + + + + + - : Z.t list -> bool = + + + + + +
                                                                                                                                                                      Proved
                                                                                                                                                                      proof
                                                                                                                                                                      ground_instances:39
                                                                                                                                                                      definitions:0
                                                                                                                                                                      inductions:0
                                                                                                                                                                      search_time:
                                                                                                                                                                      0.233s
                                                                                                                                                                      details:
                                                                                                                                                                      Expand
                                                                                                                                                                      smt_stats:
                                                                                                                                                                      array def const:2
                                                                                                                                                                      num checks:79
                                                                                                                                                                      array sel const:270
                                                                                                                                                                      array def store:340
                                                                                                                                                                      array exp ax2:620
                                                                                                                                                                      array splits:143
                                                                                                                                                                      rlimit count:602884
                                                                                                                                                                      array ext ax:57
                                                                                                                                                                      mk clause:2812
                                                                                                                                                                      array ax1:10
                                                                                                                                                                      datatype occurs check:10617
                                                                                                                                                                      restarts:1
                                                                                                                                                                      mk bool var:23138
                                                                                                                                                                      array ax2:1808
                                                                                                                                                                      datatype splits:5336
                                                                                                                                                                      decisions:26717
                                                                                                                                                                      propagations:26724
                                                                                                                                                                      conflicts:646
                                                                                                                                                                      datatype accessor ax:1702
                                                                                                                                                                      minimized lits:511
                                                                                                                                                                      datatype constructor ax:13332
                                                                                                                                                                      num allocs:336747425
                                                                                                                                                                      final checks:311
                                                                                                                                                                      added eqs:129986
                                                                                                                                                                      del clause:1974
                                                                                                                                                                      time:0.003000
                                                                                                                                                                      memory:29.200000
                                                                                                                                                                      max memory:29.300000
                                                                                                                                                                      Expand
                                                                                                                                                                      • start[0.233s]
                                                                                                                                                                        +  let (_x_0 : (state * int list))
                                                                                                                                                                        +      = run
                                                                                                                                                                        +        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                        +         conflict = …}
                                                                                                                                                                        +        (List.take … ( :var_0: ))
                                                                                                                                                                        +  in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                      • simplify

                                                                                                                                                                        into:
                                                                                                                                                                        let (_x_0 : (state * int list))
                                                                                                                                                                        +    = run
                                                                                                                                                                        +      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                        +       conflict = …}
                                                                                                                                                                        +      (List.take 5 ( :var_0: ))
                                                                                                                                                                        +in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                        expansions:
                                                                                                                                                                        []
                                                                                                                                                                        rewrite_steps:
                                                                                                                                                                          forward_chaining:
                                                                                                                                                                          • unroll
                                                                                                                                                                            expr:
                                                                                                                                                                            (|List.take_1448/server| 5 sensors_1438/client)
                                                                                                                                                                            expansions:
                                                                                                                                                                            • unroll
                                                                                                                                                                              expr:
                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                              +                   (Node_1246/client E_1251/client)
                                                                                                                                                                              +   …
                                                                                                                                                                              expansions:
                                                                                                                                                                              • unroll
                                                                                                                                                                                expr:
                                                                                                                                                                                (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                +                 (|::| B_1248/client
                                                                                                                                                                                +                       (|::| C_1…
                                                                                                                                                                                expansions:
                                                                                                                                                                                • unroll
                                                                                                                                                                                  expr:
                                                                                                                                                                                  (let ((a!1 (|::| (tuple_mk_1433/server Apple_1272/client Unsharable_1279/client)
                                                                                                                                                                                  +                 (|…
                                                                                                                                                                                  expansions:
                                                                                                                                                                                  • unroll
                                                                                                                                                                                    expr:
                                                                                                                                                                                    (|List.take_1448/server| 4 (|get.::.1_1416/server| sensors_1438/client))
                                                                                                                                                                                    expansions:
                                                                                                                                                                                    • unroll
                                                                                                                                                                                      expr:
                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                      +                   (Node_1246/client E_1251/client)
                                                                                                                                                                                      +   …
                                                                                                                                                                                      expansions:
                                                                                                                                                                                      • unroll
                                                                                                                                                                                        expr:
                                                                                                                                                                                        (|Map.of_list_1441/server|
                                                                                                                                                                                        +  Sharable_1278/client
                                                                                                                                                                                        +  (|::| (tuple_mk_1433/server Banana_1273/client S…
                                                                                                                                                                                        expansions:
                                                                                                                                                                                        • unroll
                                                                                                                                                                                          expr:
                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                          +                   (Node_1246/client E_1251/client)
                                                                                                                                                                                          +   …
                                                                                                                                                                                          expansions:
                                                                                                                                                                                          • unroll
                                                                                                                                                                                            expr:
                                                                                                                                                                                            (|Map.of_list_1441/server|
                                                                                                                                                                                            +  Sharable_1278/client
                                                                                                                                                                                            +  (|::| (tuple_mk_1433/server Orange_1274/client S…
                                                                                                                                                                                            expansions:
                                                                                                                                                                                            • unroll
                                                                                                                                                                                              expr:
                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                              +                   (Node_1246/client E_1251/client)
                                                                                                                                                                                              +   …
                                                                                                                                                                                              expansions:
                                                                                                                                                                                              • unroll
                                                                                                                                                                                                expr:
                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                +                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                +   …
                                                                                                                                                                                                expansions:
                                                                                                                                                                                                • unroll
                                                                                                                                                                                                  expr:
                                                                                                                                                                                                  (|Map.of_list_1441/server| Sharable_1278/client |[]|)
                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                    expr:
                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                    +                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                    +   …
                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                      expr:
                                                                                                                                                                                                      (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                      +                 (|::| B_1248/client
                                                                                                                                                                                                      +                       (|::| C_1…
                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                        expr:
                                                                                                                                                                                                        (|List.take_1448/server|
                                                                                                                                                                                                        +  3
                                                                                                                                                                                                        +  (|get.::.1_1416/server| (|get.::.1_1416/server| sensors_1438/client))…
                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                          expr:
                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                          +                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                          +   …
                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                            expr:
                                                                                                                                                                                                            (mk_agents_map_1408/client
                                                                                                                                                                                                            +  (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                            +          (Node_1246/client F_1252/cl…
                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                              expr:
                                                                                                                                                                                                              (mk_agents_map_1408/client |[]|)
                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                +                 (|::| B_1248/client
                                                                                                                                                                                                                +                       (|::| C_1…
                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                  +                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                  +   …
                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                    (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                    +                 (|::| B_1248/client
                                                                                                                                                                                                                    +                       (|::| C_1…
                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                      (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                      +                 (|::| B_1248/client
                                                                                                                                                                                                                      +                       (|::| C_1…
                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                        (|List.take_1448/server|
                                                                                                                                                                                                                        +  2
                                                                                                                                                                                                                        +  (|get.::.1_1416/server|
                                                                                                                                                                                                                        +    (|get.::.1_1416/server| (|get.::.1_1416/s…
                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                          (let ((a!1 (|get.::.0_1415/server|
                                                                                                                                                                                                                          +             (|get.::.1_1416/server|
                                                                                                                                                                                                                          +               (|get.::.1_14…
                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                            +                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                            +   …
                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                              (let ((a!1 (|get.::.0_1415/server|
                                                                                                                                                                                                                              +             (|get.::.1_1416/server|
                                                                                                                                                                                                                              +               (|get.::.1_14…
                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                +                 (|::| B_1248/client
                                                                                                                                                                                                                                +                       (|::| C_1…
                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_1416/server|
                                                                                                                                                                                                                                  +             (|get.::.1_1416/server|
                                                                                                                                                                                                                                  +               (|get.::.1_14…
                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_1416/server|
                                                                                                                                                                                                                                    +             (|get.::.1_1416/server|
                                                                                                                                                                                                                                    +               (|get.::.1_14…
                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                      (|Map.of_list_1441/server| Sharable_1278/client (|get.::.1_1438/server| |[]|))
                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_1416/server|
                                                                                                                                                                                                                                        +             (|get.::.1_1416/server|
                                                                                                                                                                                                                                        +               (|get.::.1_14…
                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                          +                 (|::| B_1248/client
                                                                                                                                                                                                                                          +                       (|::| C_1…
                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_1416/server|
                                                                                                                                                                                                                                            +             (|get.::.1_1416/server|
                                                                                                                                                                                                                                            +               (|get.::.1_14…
                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_1416/server|
                                                                                                                                                                                                                                              +             (|get.::.1_1416/server|
                                                                                                                                                                                                                                              +               (|get.::.1_14…
                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                                                +                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                +   …
                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_1416/server|
                                                                                                                                                                                                                                                  +             (|get.::.1_1416/server|
                                                                                                                                                                                                                                                  +               (|get.::.1_14…
                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.0_1415/server|
                                                                                                                                                                                                                                                    +             (|get.::.1_1416/server|
                                                                                                                                                                                                                                                    +               (|get.::.1_14…
                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.0_1415/server|
                                                                                                                                                                                                                                                      +             (|get.::.1_1416/server|
                                                                                                                                                                                                                                                      +               (|get.::.1_14…
                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                        +                 (|::| B_1248/client
                                                                                                                                                                                                                                                        +                       (|::| C_1…
                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                        • Unsat
                                                                                                                                                                                                                                                        + + + +## Problem 3: the use of OR in guards + +Finally, let's consider a problem in which we use the guard disjunctions (OR), which makes the search space quite a bit more complex. + + +```ocaml +(* Example 3 *) + +let ex_3 = { + work_flow_1 = [A; B; C; A]; + work_flow_2 = [D; E; F; D]; + + agents=[ + + {guard=Eq(Sensor, 1); + agent_id=Node A; + accesses=Apple}; + + {guard=Eq(Sensor, 2); + agent_id=Node B; + accesses=Banana}; + + {guard=Eq(Sensor, 3); + agent_id=Node C; + accesses=Orange}; + + {guard=Or(Eq(Sensor, 1), Eq(Sensor, 2)); + agent_id=Node D; + accesses=Orange}; + + {guard=Or(Eq(Sensor, 2), Eq(Sensor, 3)); + agent_id=Node E; + accesses=Banana}; + + {guard=Or(Eq(Sensor, 3), Eq(Sensor, 1)); + agent_id=Node F; + accesses=Apple}; + + ]; + policy=(mk_policy + [(Apple, Unsharable); + (Banana, Sharable); + (Orange, Sharable)]); +} +``` + + + + + val ex_3 : problem = + {work_flow_1 = [A;B;C;A]; work_flow_2 = [D;E;F;D]; + agents = + [{agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}; + {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}; + {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}; + {agent_id = Node D; guard = Or (Eq (Sensor, 1), Eq (Sensor, 2)); + accesses = Orange}; + {agent_id = Node E; guard = Or (Eq (Sensor, 2), Eq (Sensor, 3)); + accesses = Banana}; + {agent_id = Node F; guard = Or (Eq (Sensor, 3), Eq (Sensor, 1)); + accesses = Apple}]; + policy = (Map.of_list ~default:Sharable [(Apple, Unsharable)])} + + + + + +```ocaml +verify (fun sensors -> not (conflict_reachable ex_3 sensors)) +``` + + + + + - : Z.t list -> bool = + module CX : sig val sensors : Z.t list end + + + + + +
                                                                                                                                                                                                                                                        Counterexample (after 34 steps, 0.202s):
                                                                                                                                                                                                                                                        +let sensors : int list = [2; 3; 1]
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                        Refuted
                                                                                                                                                                                                                                                        proof attempt
                                                                                                                                                                                                                                                        ground_instances:34
                                                                                                                                                                                                                                                        definitions:0
                                                                                                                                                                                                                                                        inductions:0
                                                                                                                                                                                                                                                        search_time:
                                                                                                                                                                                                                                                        0.202s
                                                                                                                                                                                                                                                        details:
                                                                                                                                                                                                                                                        Expand
                                                                                                                                                                                                                                                        smt_stats:
                                                                                                                                                                                                                                                        array def const:2
                                                                                                                                                                                                                                                        num checks:69
                                                                                                                                                                                                                                                        array sel const:361
                                                                                                                                                                                                                                                        array def store:384
                                                                                                                                                                                                                                                        array exp ax2:654
                                                                                                                                                                                                                                                        array splits:87
                                                                                                                                                                                                                                                        rlimit count:635962
                                                                                                                                                                                                                                                        array ext ax:46
                                                                                                                                                                                                                                                        mk clause:2640
                                                                                                                                                                                                                                                        array ax1:9
                                                                                                                                                                                                                                                        datatype occurs check:9640
                                                                                                                                                                                                                                                        restarts:1
                                                                                                                                                                                                                                                        mk bool var:18264
                                                                                                                                                                                                                                                        array ax2:1724
                                                                                                                                                                                                                                                        datatype splits:6273
                                                                                                                                                                                                                                                        decisions:30118
                                                                                                                                                                                                                                                        propagations:27353
                                                                                                                                                                                                                                                        conflicts:708
                                                                                                                                                                                                                                                        datatype accessor ax:649
                                                                                                                                                                                                                                                        minimized lits:314
                                                                                                                                                                                                                                                        datatype constructor ax:12841
                                                                                                                                                                                                                                                        num allocs:488776832
                                                                                                                                                                                                                                                        final checks:281
                                                                                                                                                                                                                                                        added eqs:132509
                                                                                                                                                                                                                                                        del clause:1776
                                                                                                                                                                                                                                                        time:0.008000
                                                                                                                                                                                                                                                        memory:31.840000
                                                                                                                                                                                                                                                        max memory:31.940000
                                                                                                                                                                                                                                                        Expand
                                                                                                                                                                                                                                                        • start[0.202s]
                                                                                                                                                                                                                                                          +  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                          +      = run
                                                                                                                                                                                                                                                          +        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                          +         conflict = …}
                                                                                                                                                                                                                                                          +        (List.take … ( :var_0: ))
                                                                                                                                                                                                                                                          +  in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                        • simplify

                                                                                                                                                                                                                                                          into:
                                                                                                                                                                                                                                                          let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                          +    = run
                                                                                                                                                                                                                                                          +      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                          +       conflict = …}
                                                                                                                                                                                                                                                          +      (List.take 5 ( :var_0: ))
                                                                                                                                                                                                                                                          +in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                          []
                                                                                                                                                                                                                                                          rewrite_steps:
                                                                                                                                                                                                                                                            forward_chaining:
                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                              (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                              +                 (|::| B_1248/client
                                                                                                                                                                                                                                                              +                       (|::| C_1…
                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                +                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                +   …
                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                  (|List.take_1695/server| 5 sensors_1441/client)
                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (tuple_mk_1680/server Apple_1272/client Unsharable_1279/client)
                                                                                                                                                                                                                                                                    +                 (|…
                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                      +                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                      +   …
                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                        +                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                        +   …
                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                          (|List.take_1695/server| 4 (|get.::.1_1663/server| sensors_1441/client))
                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                            (|Map.of_list_1688/server|
                                                                                                                                                                                                                                                                            +  Sharable_1278/client
                                                                                                                                                                                                                                                                            +  (|::| (tuple_mk_1680/server Banana_1273/client S…
                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                              +                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                              +   …
                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                +                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                +   …
                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                  (|Map.of_list_1688/server|
                                                                                                                                                                                                                                                                                  +  Sharable_1278/client
                                                                                                                                                                                                                                                                                  +  (|::| (tuple_mk_1680/server Orange_1274/client S…
                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                    +                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                    +   …
                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                      (|Map.of_list_1688/server| Sharable_1278/client |[]|)
                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                        +                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                        +                       (|::| C_1…
                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                          +                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                          +   …
                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                            +                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                            +   …
                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                              +                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                              +   …
                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                (mk_agents_map_1408/client |[]|)
                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                  +                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                  +   …
                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                    (|List.take_1695/server|
                                                                                                                                                                                                                                                                                                    +  3
                                                                                                                                                                                                                                                                                                    +  (|get.::.1_1663/server| (|get.::.1_1663/server| sensors_1441/client))…
                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                      +                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                      +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                        +                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                        +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                          +                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                          +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                            +                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                            +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                              +                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                              +   …
                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                (|List.take_1695/server|
                                                                                                                                                                                                                                                                                                                +  2
                                                                                                                                                                                                                                                                                                                +  (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                +    (|get.::.1_1663/server| (|get.::.1_1663/s…
                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                  +                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                  +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.0_1662/server|
                                                                                                                                                                                                                                                                                                                    +             (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                    +               (|get.::.1_16…
                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.0_1662/server|
                                                                                                                                                                                                                                                                                                                      +             (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                      +               (|get.::.1_16…
                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                                        +                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                                        +   …
                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                          +                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                          +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                            +             (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                            +               (|get.::.1_16…
                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.0_1662/server|
                                                                                                                                                                                                                                                                                                                              +             (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                              +               (|get.::.1_16…
                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.0_1662/server|
                                                                                                                                                                                                                                                                                                                                +             (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                                +               (|get.::.1_16…
                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                • Sat (Some let sensors : int list = + [(Z.of_nativeint (2n)); (Z.of_nativeint (3n)); (Z.of_nativeint (1n))] +)
                                                                                                                                                                                                                                                                                                                                + + + +As we can see, Imandra has proved for us that a conflict is possible for `ex_3`. It's a very nice exercise to go through the counterexample manually and understand how this conflict occurs. You can also use Imandra's concrete execution facilities to investigate the state for this conflict: + + +```ocaml +run_problem ex_3 CX.sensors +``` + + + + + - : state * Z.t list = + ({wf_1 = [A;B;C;A]; wf_2 = [F;D]; sensor = Some 1; + agents = + (Map.of_list ~default:None + [(A, Some {agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}); + (B, Some {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}); + (C, Some {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}); + (D, + Some + {agent_id = Node D; guard = Or (Eq (Sensor, 1), Eq (Sensor, 2)); + accesses = Orange}); + (E, + Some + {agent_id = Node E; guard = Or (Eq (Sensor, 2), Eq (Sensor, 3)); + accesses = Banana}); + (F, + Some + {agent_id = Node F; guard = Or (Eq (Sensor, 3), Eq (Sensor, 1)); + accesses = Apple})]); + policy = (Map.of_list ~default:Sharable [(Apple, Unsharable)]); + conflict = Some (Node A, Node F, Apple)}, + []) + + + + +We can see that the conflict Imandra found, which happens with a sensor sequence of `[2;3;1]` results in both `Node A` and `Node F` trying to access `Apple` at the same time, which is not allowed by the resource access policy. + +You can modify these problems as you see fit and experiment with Imandra verifying or refuting conflict safety. Happy reasoning! + + +```ocaml + +``` From 23ad26dc830100a5ac68e57383f46b922260080c Mon Sep 17 00:00:00 2001 From: Grant Passmore Date: Wed, 15 Feb 2023 16:29:57 -0600 Subject: [PATCH 2/7] chore(rename): rename the conflict notebook to `Concurrent Conflict Detection` and improve the prose a bit --- .../Concurrent Conflict Detection.md | 2083 +++++++++++++++++ notebooks-src/imandra-conflict-detection.md | 2045 ---------------- 2 files changed, 2083 insertions(+), 2045 deletions(-) create mode 100644 notebooks-src/Concurrent Conflict Detection.md delete mode 100644 notebooks-src/imandra-conflict-detection.md diff --git a/notebooks-src/Concurrent Conflict Detection.md b/notebooks-src/Concurrent Conflict Detection.md new file mode 100644 index 00000000..db4e4b10 --- /dev/null +++ b/notebooks-src/Concurrent Conflict Detection.md @@ -0,0 +1,2083 @@ +# Imandra for automated conflict detection + +In this notebook, we will build an Imandra framework for reasoning about concurrent conflict detection. Once we encode this model in Imandra, we'll be able to use Imandra to automatically solve arbitrary problems about concurrent resource detection simply by encoding them in a simple datatype and asking Imandra if a conflict is possible. + +Let's begin with an informal description of the problem space. + +# Detecting resource conflicts over concurrent workflows + +Imagine there are two workflows, WF1 and WF2, that can each access Sharable and Unsharable resources. + +We define a conflict as any possible scenario in which WF1 and WF2 both access +an Unsharable resource at the same time. + +For a given problem specification, we want to prove either that a conflict can never occur, or to prove that a conflict can occur and synthesize a witness (a sequence of events) realizing the conflict. + +## Imagine we have the following work-flows + +### WF1 +``` +A -> B -> C -> A +``` + +### WF2 +``` +D -> E -> F -> D +``` + +## Now, consider the following motivating problems + +### Problem 1 + +Assume that we have the following definitions: + +Node A +- Starts when `Sensor == 1` +- Accesses `Apple` + +Node B +- Starts when `Sensor == 2` +- Accesses `Banana` + +Node C +- Starts when `Sensor == 3` +- Accesses `Orange` + +Node D +- Starts when `Sensor == 1` +- Accesses `Orange` + +Node E +- Starts when `Sensor == 2` +- Accesses `Banana` + +Node F +- Starts when `Sensor == 3` +- Accesses `Apple` + +### Problem 1A +Suppose that we define our resources as such: + +Resources +- Apple: `Sharable` +- Banana: `Unsharable` +- Orange: `Sharable` + +If the following sequence of events is seen: +1. `Sensor = 1` (`WF1 -> A`) (`WF2 -> D`) +2. `Sensor = 2` (`WF1 -> B`) (`WF2 -> E`) + +Then `B` and `E` will access `Banana` (which is an Unsharable resource) at the same time, and there exists a sequence of events such that **a conflict is possible**. + +### Problem 1B +Suppose that we now define our resources as such: + +Resources +- Apple: `Unsharable` +- Banana: `Sharable` +- Orange: `Sharable` + +Then there is **no such sequence of events such that a conflict is possible**. + +### Problem 1C +Suppose we keep the resource definition as in 1B but now change the definition of the Nodes to be: + +Node D +- Starts when `Sensor == 1` OR `Sensor == 2` + +Node E +- Starts when `Sensor == 2` OR `Sensor == 3` + +Node F +- Starts when `Sensor == 3` OR `Sensor == 1` +- Accesses `Apple` + +If the following sequence of events is seen: +1. `Sensor = 2` (`WF2 -> D`) +2. `Sensor = 3` (`WF2 -> E`) +3. `Sensor = 1` (`WF2 -> F`) (`WF1 -> A`) + +Then `F` and `A` will access `Apple` (which is an Unsharable resource) at the same time, and there exists a sequence of events such that **a conflict is possible**. + +# Let's now build a framework in Imandra to allow us to answer these questions automatically + +We'll start with defining *agents*, *resources*, *guards* and *policies*. + + +```ocaml +type agent_id = + | Node of node_id + +and node_id = + A | B | C | D | E | F + +type guard = + | Eq of sensor * int + | Or of guard * guard + +and sensor = + | Sensor + +type resource = + | Apple + | Banana + | Orange + +type sharability = + | Sharable + | Unsharable + +type policy = + (resource, sharability) Map.t +``` + + + + + type agent_id = Node of node_id + and node_id = A | B | C | D | E | F + type guard = Eq of sensor * Z.t | Or of guard * guard + and sensor = Sensor + type resource = Apple | Banana | Orange + type sharability = Sharable | Unsharable + type policy = (resource, sharability) Map.t + + + + +# Problems + +Next, we'll define the *problem* datatype, which will allow us to succinctly express an arbitrary conflict detection problem of the above form to Imandra for analysis. + +As above, a problem will consist of a pair of workflows, a collection of agents (each with their own identities, guards and resource accesses) and a resource access policy specifying which resources can be shared. + + +```ocaml +type problem = { + work_flow_1: work_flow; + work_flow_2: work_flow; + agents: agent list; + policy: policy; +} + +and work_flow = node_id list + +and agent = { + agent_id: agent_id; + guard: guard; + accesses: resource; +} +``` + + + + + type problem = { + work_flow_1 : work_flow; + work_flow_2 : work_flow; + agents : agent list; + policy : policy; + } + and work_flow = node_id list + and agent = { agent_id : agent_id; guard : guard; accesses : resource; } + + + + +# Operational Semantics + +Next, we're going to encode the "meaning" or "semantics" of concurrent conflicts in Imandra by defining an *interpreter* which evaluates a problem over arbitrary states of the world. Then, we'll be able to use Imandra's symbolic reasoning power to prove or disprove the existence of a conflict for a given problem by asking it to symbolically evaluate all possible behaviors of the interpreter over a given problem specification. + +## State + +The `state` datatype will encode the current state of the world. This is core datatype over which a problem execution trace will take place. + +## Interpreter + +Armed with the `state` type, we will define an interpreter which accepts a problem and a sequence of sensor readings, and yields the result. + + +```ocaml +(* The current state of the world *) + +type state = { + wf_1: work_flow; + wf_2: work_flow; + sensor: int option; + agents: (node_id, agent option) Map.t; + policy: policy; + conflict: (agent_id * agent_id * resource) option; +} + +let rec eval_guard (sensor:int) (g:guard) = + match g with + | Eq (Sensor, n) -> sensor = n + | Or (g1, g2) -> + eval_guard sensor g1 || eval_guard sensor g2 + +let step (s:state) (sensor:int) = + let in_conflict r1 r2 policy = + r1 = r2 && Map.get r1 policy = Unsharable + in + match s.wf_1, s.wf_2 with + | agent_1 :: wf_1', agent_2 :: wf_2' -> + begin match Map.get agent_1 s.agents, Map.get agent_2 s.agents with + | Some actor_1, Some actor_2 -> + let g_1, g_2 = eval_guard sensor actor_1.guard, + eval_guard sensor actor_2.guard in + if g_1 && g_2 && in_conflict actor_1.accesses actor_2.accesses s.policy then ( + { s with + sensor = Some sensor; + conflict = Some (Node agent_1, Node agent_2, actor_1.accesses); + } + ) else ( + { s with + sensor = Some sensor; + wf_1 = if g_1 then wf_1' else s.wf_1; + wf_2 = if g_2 then wf_2' else s.wf_2; + } + ) + | _ -> s + end + | _ -> s + +let rec run (s:state) (sensors:int list) = + match sensors with + | [] -> (s, []) + | sensor :: sensors -> + let s' = step s sensor in + if s'.conflict = None then ( + run s' sensors + ) else ( + (s', sensors) + ) +[@@adm sensors] +``` + + + + + type state = { + wf_1 : work_flow; + wf_2 : work_flow; + sensor : Z.t option; + agents : (node_id, agent option) Map.t; + policy : policy; + conflict : (agent_id * agent_id * resource) option; + } + val eval_guard : Z.t -> guard -> bool = + val step : state -> Z.t -> state = + val run : state -> Z.t list -> state * Z.t list = + + + + + +
                                                                                                                                                                                                                                                                                                                                termination proof

                                                                                                                                                                                                                                                                                                                                Termination proof

                                                                                                                                                                                                                                                                                                                                call `eval_guard sensor (Destruct(Or, 0, g))` from `eval_guard sensor g`
                                                                                                                                                                                                                                                                                                                                original:eval_guard sensor g
                                                                                                                                                                                                                                                                                                                                sub:eval_guard sensor (Destruct(Or, 0, g))
                                                                                                                                                                                                                                                                                                                                original ordinal:Ordinal.Int (_cnt g)
                                                                                                                                                                                                                                                                                                                                sub ordinal:Ordinal.Int (_cnt (Destruct(Or, 0, g)))
                                                                                                                                                                                                                                                                                                                                path:[not Is_a(Eq, g)]
                                                                                                                                                                                                                                                                                                                                proof:
                                                                                                                                                                                                                                                                                                                                detailed proof
                                                                                                                                                                                                                                                                                                                                ground_instances:3
                                                                                                                                                                                                                                                                                                                                definitions:0
                                                                                                                                                                                                                                                                                                                                inductions:0
                                                                                                                                                                                                                                                                                                                                search_time:
                                                                                                                                                                                                                                                                                                                                0.011s
                                                                                                                                                                                                                                                                                                                                details:
                                                                                                                                                                                                                                                                                                                                Expand
                                                                                                                                                                                                                                                                                                                                smt_stats:
                                                                                                                                                                                                                                                                                                                                num checks:8
                                                                                                                                                                                                                                                                                                                                arith assert lower:11
                                                                                                                                                                                                                                                                                                                                arith tableau max rows:6
                                                                                                                                                                                                                                                                                                                                arith tableau max columns:19
                                                                                                                                                                                                                                                                                                                                arith pivots:10
                                                                                                                                                                                                                                                                                                                                rlimit count:5442
                                                                                                                                                                                                                                                                                                                                mk clause:24
                                                                                                                                                                                                                                                                                                                                datatype occurs check:27
                                                                                                                                                                                                                                                                                                                                mk bool var:117
                                                                                                                                                                                                                                                                                                                                arith assert upper:8
                                                                                                                                                                                                                                                                                                                                datatype splits:9
                                                                                                                                                                                                                                                                                                                                decisions:19
                                                                                                                                                                                                                                                                                                                                arith row summations:10
                                                                                                                                                                                                                                                                                                                                propagations:19
                                                                                                                                                                                                                                                                                                                                conflicts:6
                                                                                                                                                                                                                                                                                                                                arith fixed eqs:4
                                                                                                                                                                                                                                                                                                                                datatype accessor ax:18
                                                                                                                                                                                                                                                                                                                                arith conflicts:2
                                                                                                                                                                                                                                                                                                                                arith num rows:6
                                                                                                                                                                                                                                                                                                                                datatype constructor ax:31
                                                                                                                                                                                                                                                                                                                                num allocs:685043017
                                                                                                                                                                                                                                                                                                                                final checks:6
                                                                                                                                                                                                                                                                                                                                added eqs:97
                                                                                                                                                                                                                                                                                                                                del clause:7
                                                                                                                                                                                                                                                                                                                                arith eq adapter:6
                                                                                                                                                                                                                                                                                                                                memory:32.360000
                                                                                                                                                                                                                                                                                                                                max memory:32.370000
                                                                                                                                                                                                                                                                                                                                Expand
                                                                                                                                                                                                                                                                                                                                • start[0.011s]
                                                                                                                                                                                                                                                                                                                                  +  let (_x_0 : int) = count.guard g in
                                                                                                                                                                                                                                                                                                                                  +  let (_x_1 : guard) = Destruct(Or, 0, g) in
                                                                                                                                                                                                                                                                                                                                  +  let (_x_2 : int) = count.guard _x_1 in
                                                                                                                                                                                                                                                                                                                                  +  let (_x_3 : bool) = Is_a(Eq, _x_1) in
                                                                                                                                                                                                                                                                                                                                  +  not Is_a(Eq, g) && ((_x_0 >= 0) && (_x_2 >= 0))
                                                                                                                                                                                                                                                                                                                                  +  ==> (_x_3
                                                                                                                                                                                                                                                                                                                                  +       && not (not (eval_guard sensor (Destruct(Or, 0, _x_1))) && not _x_3))
                                                                                                                                                                                                                                                                                                                                  +      || Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
                                                                                                                                                                                                                                                                                                                                • simplify
                                                                                                                                                                                                                                                                                                                                  into:
                                                                                                                                                                                                                                                                                                                                  let (_x_0 : int) = count.guard g in
                                                                                                                                                                                                                                                                                                                                  +let (_x_1 : guard) = Destruct(Or, 0, g) in
                                                                                                                                                                                                                                                                                                                                  +let (_x_2 : int) = count.guard _x_1 in
                                                                                                                                                                                                                                                                                                                                  +let (_x_3 : bool) = Is_a(Eq, _x_1) in
                                                                                                                                                                                                                                                                                                                                  +not (not Is_a(Eq, g) && (_x_0 >= 0) && (_x_2 >= 0))
                                                                                                                                                                                                                                                                                                                                  +|| Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
                                                                                                                                                                                                                                                                                                                                  +|| (_x_3 && not (not (eval_guard sensor (Destruct(Or, 0, _x_1))) && not _x_3))
                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                  []
                                                                                                                                                                                                                                                                                                                                  rewrite_steps:
                                                                                                                                                                                                                                                                                                                                    forward_chaining:
                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                      (|Ordinal.<<| (|Ordinal.Int_79/boot|
                                                                                                                                                                                                                                                                                                                                      +                (|count.guard_1519/client|
                                                                                                                                                                                                                                                                                                                                      +                  (|…
                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                        (|count.guard_1519/client| (|get.Or.0_1913/server| g_1916/server))
                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                          (|count.guard_1519/client| g_1916/server)
                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                          • Unsat
                                                                                                                                                                                                                                                                                                                                          call `eval_guard sensor (Destruct(Or, 1, g))` from `eval_guard sensor g`
                                                                                                                                                                                                                                                                                                                                          original:eval_guard sensor g
                                                                                                                                                                                                                                                                                                                                          sub:eval_guard sensor (Destruct(Or, 1, g))
                                                                                                                                                                                                                                                                                                                                          original ordinal:Ordinal.Int (_cnt g)
                                                                                                                                                                                                                                                                                                                                          sub ordinal:Ordinal.Int (_cnt (Destruct(Or, 1, g)))
                                                                                                                                                                                                                                                                                                                                          path:[not (eval_guard sensor (Destruct(Or, 0, g))) && not Is_a(Eq, g)]
                                                                                                                                                                                                                                                                                                                                          proof:
                                                                                                                                                                                                                                                                                                                                          detailed proof
                                                                                                                                                                                                                                                                                                                                          ground_instances:3
                                                                                                                                                                                                                                                                                                                                          definitions:0
                                                                                                                                                                                                                                                                                                                                          inductions:0
                                                                                                                                                                                                                                                                                                                                          search_time:
                                                                                                                                                                                                                                                                                                                                          0.011s
                                                                                                                                                                                                                                                                                                                                          details:
                                                                                                                                                                                                                                                                                                                                          Expand
                                                                                                                                                                                                                                                                                                                                          smt_stats:
                                                                                                                                                                                                                                                                                                                                          num checks:8
                                                                                                                                                                                                                                                                                                                                          arith assert lower:11
                                                                                                                                                                                                                                                                                                                                          arith tableau max rows:6
                                                                                                                                                                                                                                                                                                                                          arith tableau max columns:19
                                                                                                                                                                                                                                                                                                                                          arith pivots:10
                                                                                                                                                                                                                                                                                                                                          rlimit count:2742
                                                                                                                                                                                                                                                                                                                                          mk clause:24
                                                                                                                                                                                                                                                                                                                                          datatype occurs check:27
                                                                                                                                                                                                                                                                                                                                          mk bool var:118
                                                                                                                                                                                                                                                                                                                                          arith assert upper:8
                                                                                                                                                                                                                                                                                                                                          datatype splits:9
                                                                                                                                                                                                                                                                                                                                          decisions:19
                                                                                                                                                                                                                                                                                                                                          arith row summations:10
                                                                                                                                                                                                                                                                                                                                          propagations:19
                                                                                                                                                                                                                                                                                                                                          conflicts:6
                                                                                                                                                                                                                                                                                                                                          arith fixed eqs:4
                                                                                                                                                                                                                                                                                                                                          datatype accessor ax:18
                                                                                                                                                                                                                                                                                                                                          arith conflicts:2
                                                                                                                                                                                                                                                                                                                                          arith num rows:6
                                                                                                                                                                                                                                                                                                                                          datatype constructor ax:31
                                                                                                                                                                                                                                                                                                                                          num allocs:617614653
                                                                                                                                                                                                                                                                                                                                          final checks:6
                                                                                                                                                                                                                                                                                                                                          added eqs:97
                                                                                                                                                                                                                                                                                                                                          del clause:7
                                                                                                                                                                                                                                                                                                                                          arith eq adapter:6
                                                                                                                                                                                                                                                                                                                                          memory:32.370000
                                                                                                                                                                                                                                                                                                                                          max memory:32.370000
                                                                                                                                                                                                                                                                                                                                          Expand
                                                                                                                                                                                                                                                                                                                                          • start[0.011s]
                                                                                                                                                                                                                                                                                                                                            +  let (_x_0 : int) = count.guard g in
                                                                                                                                                                                                                                                                                                                                            +  let (_x_1 : guard) = Destruct(Or, 1, g) in
                                                                                                                                                                                                                                                                                                                                            +  let (_x_2 : int) = count.guard _x_1 in
                                                                                                                                                                                                                                                                                                                                            +  let (_x_3 : bool) = Is_a(Eq, _x_1) in
                                                                                                                                                                                                                                                                                                                                            +  not (eval_guard sensor (Destruct(Or, 0, g)))
                                                                                                                                                                                                                                                                                                                                            +  && (not Is_a(Eq, g) && ((_x_0 >= 0) && (_x_2 >= 0)))
                                                                                                                                                                                                                                                                                                                                            +  ==> (_x_3
                                                                                                                                                                                                                                                                                                                                            +       && not (not (eval_guard sensor (Destruct(Or, 0, _x_1))) && not _x_3))
                                                                                                                                                                                                                                                                                                                                            +      || Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
                                                                                                                                                                                                                                                                                                                                          • simplify
                                                                                                                                                                                                                                                                                                                                            into:
                                                                                                                                                                                                                                                                                                                                            let (_x_0 : guard) = Destruct(Or, 1, g) in
                                                                                                                                                                                                                                                                                                                                            +let (_x_1 : bool) = Is_a(Eq, _x_0) in
                                                                                                                                                                                                                                                                                                                                            +let (_x_2 : int) = count.guard _x_0 in
                                                                                                                                                                                                                                                                                                                                            +let (_x_3 : int) = count.guard g in
                                                                                                                                                                                                                                                                                                                                            +(_x_1 && not (not (eval_guard sensor (Destruct(Or, 0, _x_0))) && not _x_1))
                                                                                                                                                                                                                                                                                                                                            +|| Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_3)
                                                                                                                                                                                                                                                                                                                                            +|| not
                                                                                                                                                                                                                                                                                                                                            +   (not (eval_guard sensor (Destruct(Or, 0, g))) && not Is_a(Eq, g)
                                                                                                                                                                                                                                                                                                                                            +    && (_x_3 >= 0) && (_x_2 >= 0))
                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                            []
                                                                                                                                                                                                                                                                                                                                            rewrite_steps:
                                                                                                                                                                                                                                                                                                                                              forward_chaining:
                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                (|Ordinal.<<| (|Ordinal.Int_79/boot|
                                                                                                                                                                                                                                                                                                                                                +                (|count.guard_1519/client|
                                                                                                                                                                                                                                                                                                                                                +                  (|…
                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                  (|count.guard_1519/client| (|get.Or.1_1914/server| g_1916/server))
                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                    (|count.guard_1519/client| g_1916/server)
                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                    • Unsat
                                                                                                                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                                                                                                                    termination proof

                                                                                                                                                                                                                                                                                                                                                    Termination proof

                                                                                                                                                                                                                                                                                                                                                    call `run (step s (List.hd sensors)) (List.tl sensors)` from `run s sensors`
                                                                                                                                                                                                                                                                                                                                                    original:run s sensors
                                                                                                                                                                                                                                                                                                                                                    sub:run (step s (List.hd sensors)) (List.tl sensors)
                                                                                                                                                                                                                                                                                                                                                    original ordinal:Ordinal.Int (_cnt sensors)
                                                                                                                                                                                                                                                                                                                                                    sub ordinal:Ordinal.Int (_cnt (List.tl sensors))
                                                                                                                                                                                                                                                                                                                                                    path:[(step s (List.hd sensors)).conflict = None && sensors <> []]
                                                                                                                                                                                                                                                                                                                                                    proof:
                                                                                                                                                                                                                                                                                                                                                    detailed proof
                                                                                                                                                                                                                                                                                                                                                    ground_instances:3
                                                                                                                                                                                                                                                                                                                                                    definitions:0
                                                                                                                                                                                                                                                                                                                                                    inductions:0
                                                                                                                                                                                                                                                                                                                                                    search_time:
                                                                                                                                                                                                                                                                                                                                                    0.017s
                                                                                                                                                                                                                                                                                                                                                    details:
                                                                                                                                                                                                                                                                                                                                                    Expand
                                                                                                                                                                                                                                                                                                                                                    smt_stats:
                                                                                                                                                                                                                                                                                                                                                    num checks:8
                                                                                                                                                                                                                                                                                                                                                    arith assert lower:30
                                                                                                                                                                                                                                                                                                                                                    arith tableau max rows:8
                                                                                                                                                                                                                                                                                                                                                    arith tableau max columns:19
                                                                                                                                                                                                                                                                                                                                                    arith pivots:19
                                                                                                                                                                                                                                                                                                                                                    rlimit count:17662
                                                                                                                                                                                                                                                                                                                                                    mk clause:222
                                                                                                                                                                                                                                                                                                                                                    datatype occurs check:268
                                                                                                                                                                                                                                                                                                                                                    mk bool var:1105
                                                                                                                                                                                                                                                                                                                                                    arith assert upper:25
                                                                                                                                                                                                                                                                                                                                                    datatype splits:290
                                                                                                                                                                                                                                                                                                                                                    decisions:450
                                                                                                                                                                                                                                                                                                                                                    arith row summations:28
                                                                                                                                                                                                                                                                                                                                                    arith bound prop:1
                                                                                                                                                                                                                                                                                                                                                    propagations:550
                                                                                                                                                                                                                                                                                                                                                    conflicts:29
                                                                                                                                                                                                                                                                                                                                                    arith fixed eqs:14
                                                                                                                                                                                                                                                                                                                                                    datatype accessor ax:141
                                                                                                                                                                                                                                                                                                                                                    minimized lits:5
                                                                                                                                                                                                                                                                                                                                                    arith conflicts:2
                                                                                                                                                                                                                                                                                                                                                    arith num rows:8
                                                                                                                                                                                                                                                                                                                                                    arith assert diseq:5
                                                                                                                                                                                                                                                                                                                                                    datatype constructor ax:603
                                                                                                                                                                                                                                                                                                                                                    num allocs:768512040
                                                                                                                                                                                                                                                                                                                                                    final checks:13
                                                                                                                                                                                                                                                                                                                                                    added eqs:2772
                                                                                                                                                                                                                                                                                                                                                    del clause:21
                                                                                                                                                                                                                                                                                                                                                    arith eq adapter:25
                                                                                                                                                                                                                                                                                                                                                    memory:33.450000
                                                                                                                                                                                                                                                                                                                                                    max memory:33.450000
                                                                                                                                                                                                                                                                                                                                                    Expand
                                                                                                                                                                                                                                                                                                                                                    • start[0.017s]
                                                                                                                                                                                                                                                                                                                                                      +  let (_x_0 : bool) = Is_a(Some, …) in
                                                                                                                                                                                                                                                                                                                                                      +  let (_x_1 : bool) = s.wf_1 <> [] in
                                                                                                                                                                                                                                                                                                                                                      +  let (_x_2 : bool) = s.wf_2 <> [] in
                                                                                                                                                                                                                                                                                                                                                      +  let (_x_3 : int) = count.list mk_nat sensors in
                                                                                                                                                                                                                                                                                                                                                      +  let (_x_4 : int list) = List.tl sensors in
                                                                                                                                                                                                                                                                                                                                                      +  let (_x_5 : int) = count.list mk_nat _x_4 in
                                                                                                                                                                                                                                                                                                                                                      +  let (_x_6 : state) = if _x_2 then … else s in
                                                                                                                                                                                                                                                                                                                                                      +  ((if _x_2 then if _x_1 then if _x_0 then … else s else s else s).conflict
                                                                                                                                                                                                                                                                                                                                                      +   = None)
                                                                                                                                                                                                                                                                                                                                                      +  && (sensors <> [] && ((_x_3 >= 0) && (_x_5 >= 0)))
                                                                                                                                                                                                                                                                                                                                                      +  ==> not
                                                                                                                                                                                                                                                                                                                                                      +      (((if _x_6.wf_2 <> []
                                                                                                                                                                                                                                                                                                                                                      +         then if ….wf_1 <> [] then if _x_0 then … else … else _x_6
                                                                                                                                                                                                                                                                                                                                                      +         else if _x_2 then if _x_1 then … else s else s).conflict
                                                                                                                                                                                                                                                                                                                                                      +        = None)
                                                                                                                                                                                                                                                                                                                                                      +       && _x_4 <> [])
                                                                                                                                                                                                                                                                                                                                                      +      || Ordinal.( << ) (Ordinal.Int _x_5) (Ordinal.Int _x_3)
                                                                                                                                                                                                                                                                                                                                                    • simplify
                                                                                                                                                                                                                                                                                                                                                      into:
                                                                                                                                                                                                                                                                                                                                                      let (_x_0 : int list) = List.tl sensors in
                                                                                                                                                                                                                                                                                                                                                      +let (_x_1 : int) = count.list mk_nat _x_0 in
                                                                                                                                                                                                                                                                                                                                                      +let (_x_2 : int) = count.list mk_nat sensors in
                                                                                                                                                                                                                                                                                                                                                      +let (_x_3 : bool) = s.wf_1 <> [] in
                                                                                                                                                                                                                                                                                                                                                      +let (_x_4 : bool) = s.wf_2 <> [] in
                                                                                                                                                                                                                                                                                                                                                      +let (_x_5 : state) = if _x_4 then … else s in
                                                                                                                                                                                                                                                                                                                                                      +let (_x_6 : bool) = Is_a(Some, …) in
                                                                                                                                                                                                                                                                                                                                                      +Ordinal.( << ) (Ordinal.Int _x_1) (Ordinal.Int _x_2)
                                                                                                                                                                                                                                                                                                                                                      +|| not
                                                                                                                                                                                                                                                                                                                                                      +   (((if _x_5.wf_2 <> []
                                                                                                                                                                                                                                                                                                                                                      +      then if ….wf_1 <> [] then if _x_6 then … else … else _x_5
                                                                                                                                                                                                                                                                                                                                                      +      else if _x_4 then if _x_3 then … else s else s).conflict
                                                                                                                                                                                                                                                                                                                                                      +     = None)
                                                                                                                                                                                                                                                                                                                                                      +    && _x_0 <> [])
                                                                                                                                                                                                                                                                                                                                                      +|| not
                                                                                                                                                                                                                                                                                                                                                      +   (((if _x_4 then if _x_3 then if _x_6 then … else s else s else s).conflict
                                                                                                                                                                                                                                                                                                                                                      +     = None)
                                                                                                                                                                                                                                                                                                                                                      +    && sensors <> [] && (_x_2 >= 0) && (_x_1 >= 0))
                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                      []
                                                                                                                                                                                                                                                                                                                                                      rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                        forward_chaining:
                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                          (|Ordinal.<<| (|Ordinal.Int_79/boot|
                                                                                                                                                                                                                                                                                                                                                          +                (|count.list_2066/server|
                                                                                                                                                                                                                                                                                                                                                          +                  (|g…
                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                            (|count.list_2066/server| (|get.::.1_2048/server| sensors_2054/server))
                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                              (|count.list_2066/server| sensors_2054/server)
                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                              • Unsat
                                                                                                                                                                                                                                                                                                                                                              + + + +# Top-level problem runner and problem-specific conflict detection + +Next, we'll add the ability to define problems, run them and detect conflicts. + + +```ocaml +let rec mk_agents_map actors = + let agent_name = function Node a -> a in + match actors with + | [] -> Map.const None + | agent :: agents -> + Map.add (agent_name agent.agent_id) (Some agent) (mk_agents_map agents) + +(* Run a problem along sensor readings *) + +let run_problem (p:problem) sensors = + let init_state = { + wf_1 = p.work_flow_1; + wf_2 = p.work_flow_2; + sensor = None; + agents = mk_agents_map p.agents; + policy = p.policy; + conflict = None; + } in + run init_state sensors + +(* Is a conflict reachable from an initial state? *) + +let conflict_reachable ?(k=5) (p:problem) sensors = + let sensors = List.take k sensors in + let (s, sensors_left) = run_problem p sensors in + (s.conflict <> None && sensors_left = []) + +(* Make a policy from a list of declarations *) + +let mk_policy xs = + Map.of_list ~default:Sharable xs +``` + + + + + val mk_agents_map : agent list -> (node_id, agent option) Map.t = + val run_problem : problem -> Z.t list -> state * Z.t list = + val conflict_reachable : ?k:Z.t -> problem -> Z.t list -> bool = + val mk_policy : ('a * sharability) list -> ('a, sharability) Map.t = + + + + + +
                                                                                                                                                                                                                                                                                                                                                              termination proof

                                                                                                                                                                                                                                                                                                                                                              Termination proof

                                                                                                                                                                                                                                                                                                                                                              call `mk_agents_map (List.tl actors)` from `mk_agents_map actors`
                                                                                                                                                                                                                                                                                                                                                              original:mk_agents_map actors
                                                                                                                                                                                                                                                                                                                                                              sub:mk_agents_map (List.tl actors)
                                                                                                                                                                                                                                                                                                                                                              original ordinal:Ordinal.Int (_cnt actors)
                                                                                                                                                                                                                                                                                                                                                              sub ordinal:Ordinal.Int (_cnt (List.tl actors))
                                                                                                                                                                                                                                                                                                                                                              path:[actors <> []]
                                                                                                                                                                                                                                                                                                                                                              proof:
                                                                                                                                                                                                                                                                                                                                                              detailed proof
                                                                                                                                                                                                                                                                                                                                                              ground_instances:3
                                                                                                                                                                                                                                                                                                                                                              definitions:0
                                                                                                                                                                                                                                                                                                                                                              inductions:0
                                                                                                                                                                                                                                                                                                                                                              search_time:
                                                                                                                                                                                                                                                                                                                                                              0.012s
                                                                                                                                                                                                                                                                                                                                                              details:
                                                                                                                                                                                                                                                                                                                                                              Expand
                                                                                                                                                                                                                                                                                                                                                              smt_stats:
                                                                                                                                                                                                                                                                                                                                                              num checks:8
                                                                                                                                                                                                                                                                                                                                                              arith assert lower:17
                                                                                                                                                                                                                                                                                                                                                              arith tableau max rows:10
                                                                                                                                                                                                                                                                                                                                                              arith tableau max columns:24
                                                                                                                                                                                                                                                                                                                                                              arith pivots:13
                                                                                                                                                                                                                                                                                                                                                              rlimit count:3758
                                                                                                                                                                                                                                                                                                                                                              mk clause:38
                                                                                                                                                                                                                                                                                                                                                              datatype occurs check:25
                                                                                                                                                                                                                                                                                                                                                              mk bool var:187
                                                                                                                                                                                                                                                                                                                                                              arith assert upper:12
                                                                                                                                                                                                                                                                                                                                                              datatype splits:21
                                                                                                                                                                                                                                                                                                                                                              decisions:35
                                                                                                                                                                                                                                                                                                                                                              arith row summations:34
                                                                                                                                                                                                                                                                                                                                                              propagations:32
                                                                                                                                                                                                                                                                                                                                                              conflicts:11
                                                                                                                                                                                                                                                                                                                                                              arith fixed eqs:9
                                                                                                                                                                                                                                                                                                                                                              datatype accessor ax:30
                                                                                                                                                                                                                                                                                                                                                              minimized lits:1
                                                                                                                                                                                                                                                                                                                                                              arith conflicts:2
                                                                                                                                                                                                                                                                                                                                                              arith num rows:10
                                                                                                                                                                                                                                                                                                                                                              datatype constructor ax:71
                                                                                                                                                                                                                                                                                                                                                              num allocs:846908204
                                                                                                                                                                                                                                                                                                                                                              final checks:6
                                                                                                                                                                                                                                                                                                                                                              added eqs:222
                                                                                                                                                                                                                                                                                                                                                              del clause:15
                                                                                                                                                                                                                                                                                                                                                              arith eq adapter:12
                                                                                                                                                                                                                                                                                                                                                              memory:33.340000
                                                                                                                                                                                                                                                                                                                                                              max memory:33.450000
                                                                                                                                                                                                                                                                                                                                                              Expand
                                                                                                                                                                                                                                                                                                                                                              • start[0.012s]
                                                                                                                                                                                                                                                                                                                                                                +  let (_x_0 : int) = count.list count.agent actors in
                                                                                                                                                                                                                                                                                                                                                                +  let (_x_1 : agent list) = List.tl actors in
                                                                                                                                                                                                                                                                                                                                                                +  let (_x_2 : int) = count.list count.agent _x_1 in
                                                                                                                                                                                                                                                                                                                                                                +  actors <> [] && ((_x_0 >= 0) && (_x_2 >= 0))
                                                                                                                                                                                                                                                                                                                                                                +  ==> not (_x_1 <> [])
                                                                                                                                                                                                                                                                                                                                                                +      || Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
                                                                                                                                                                                                                                                                                                                                                              • simplify
                                                                                                                                                                                                                                                                                                                                                                into:
                                                                                                                                                                                                                                                                                                                                                                let (_x_0 : agent list) = List.tl actors in
                                                                                                                                                                                                                                                                                                                                                                +let (_x_1 : int) = count.list count.agent _x_0 in
                                                                                                                                                                                                                                                                                                                                                                +let (_x_2 : int) = count.list count.agent actors in
                                                                                                                                                                                                                                                                                                                                                                +not (_x_0 <> []) || Ordinal.( << ) (Ordinal.Int _x_1) (Ordinal.Int _x_2)
                                                                                                                                                                                                                                                                                                                                                                +|| not (actors <> [] && (_x_2 >= 0) && (_x_1 >= 0))
                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                []
                                                                                                                                                                                                                                                                                                                                                                rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                  forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                    (|Ordinal.<<| (|Ordinal.Int_79/boot|
                                                                                                                                                                                                                                                                                                                                                                    +                (|count.list_2142/server|
                                                                                                                                                                                                                                                                                                                                                                    +                  (|g…
                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                      (|count.list_2142/server| (|get.::.1_2128/server| actors_2131/server))
                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                        (|count.list_2142/server| actors_2131/server)
                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                        • Unsat
                                                                                                                                                                                                                                                                                                                                                                        + + + +# Now, let's encode some problems and check for conflicts! + +# Problem 1 + + +```ocaml +let ex_1 = { + work_flow_1 = [A; B; C; A]; + work_flow_2 = [D; E; F; D]; + agents=[ + + {agent_id=Node A; + guard=Eq(Sensor, 1); + accesses=Apple}; + + {agent_id=Node B; + guard=Eq(Sensor, 2); + accesses=Banana}; + + {agent_id=Node C; + guard=Eq(Sensor, 3); + accesses=Orange}; + + {agent_id=Node D; + guard=Eq(Sensor, 1); + accesses=Orange}; + + {agent_id=Node E; + guard=Eq(Sensor, 2); + accesses=Banana}; + + {agent_id=Node F; + guard=Eq(Sensor, 3); + accesses=Apple}; + + ]; + policy=(mk_policy + [(Apple, Sharable); + (Banana, Unsharable); + (Orange, Sharable)]); +} +``` + + + + + val ex_1 : problem = + {work_flow_1 = [A;B;C;A]; work_flow_2 = [D;E;F;D]; + agents = + [{agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}; + {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}; + {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}; + {agent_id = Node D; guard = Eq (Sensor, 1); accesses = Orange}; + {agent_id = Node E; guard = Eq (Sensor, 2); accesses = Banana}; + {agent_id = Node F; guard = Eq (Sensor, 3); accesses = Apple}]; + policy = (Map.of_list ~default:Sharable [(Banana, Unsharable)])} + + + + +# Is a conflict possible? Let's ask Imandra! + + +```ocaml +instance (fun sensors -> conflict_reachable ex_1 sensors) +``` + + + + + - : Z.t list -> bool = + module CX : sig val sensors : Z.t list end + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        Instance (after 20 steps, 0.052s):
                                                                                                                                                                                                                                                                                                                                                                        +let sensors : int list = [1; 2]
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                                                                                                        Instance
                                                                                                                                                                                                                                                                                                                                                                        proof attempt
                                                                                                                                                                                                                                                                                                                                                                        ground_instances:20
                                                                                                                                                                                                                                                                                                                                                                        definitions:0
                                                                                                                                                                                                                                                                                                                                                                        inductions:0
                                                                                                                                                                                                                                                                                                                                                                        search_time:
                                                                                                                                                                                                                                                                                                                                                                        0.052s
                                                                                                                                                                                                                                                                                                                                                                        details:
                                                                                                                                                                                                                                                                                                                                                                        Expand
                                                                                                                                                                                                                                                                                                                                                                        smt_stats:
                                                                                                                                                                                                                                                                                                                                                                        array def const:2
                                                                                                                                                                                                                                                                                                                                                                        num checks:41
                                                                                                                                                                                                                                                                                                                                                                        array sel const:49
                                                                                                                                                                                                                                                                                                                                                                        array def store:119
                                                                                                                                                                                                                                                                                                                                                                        array exp ax2:208
                                                                                                                                                                                                                                                                                                                                                                        array splits:49
                                                                                                                                                                                                                                                                                                                                                                        rlimit count:90757
                                                                                                                                                                                                                                                                                                                                                                        array ext ax:27
                                                                                                                                                                                                                                                                                                                                                                        mk clause:714
                                                                                                                                                                                                                                                                                                                                                                        array ax1:9
                                                                                                                                                                                                                                                                                                                                                                        datatype occurs check:3861
                                                                                                                                                                                                                                                                                                                                                                        mk bool var:4711
                                                                                                                                                                                                                                                                                                                                                                        array ax2:357
                                                                                                                                                                                                                                                                                                                                                                        datatype splits:880
                                                                                                                                                                                                                                                                                                                                                                        decisions:3574
                                                                                                                                                                                                                                                                                                                                                                        propagations:2772
                                                                                                                                                                                                                                                                                                                                                                        conflicts:149
                                                                                                                                                                                                                                                                                                                                                                        datatype accessor ax:220
                                                                                                                                                                                                                                                                                                                                                                        minimized lits:42
                                                                                                                                                                                                                                                                                                                                                                        datatype constructor ax:2343
                                                                                                                                                                                                                                                                                                                                                                        num allocs:962813774
                                                                                                                                                                                                                                                                                                                                                                        final checks:134
                                                                                                                                                                                                                                                                                                                                                                        added eqs:16165
                                                                                                                                                                                                                                                                                                                                                                        del clause:480
                                                                                                                                                                                                                                                                                                                                                                        time:0.002000
                                                                                                                                                                                                                                                                                                                                                                        memory:36.100000
                                                                                                                                                                                                                                                                                                                                                                        max memory:36.150000
                                                                                                                                                                                                                                                                                                                                                                        Expand
                                                                                                                                                                                                                                                                                                                                                                        • start[0.052s]
                                                                                                                                                                                                                                                                                                                                                                          +  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                          +      = run
                                                                                                                                                                                                                                                                                                                                                                          +        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                          +         conflict = …}
                                                                                                                                                                                                                                                                                                                                                                          +        (List.take … ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                          +  in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                                                                                                                                                                                                                                                                                                        • simplify

                                                                                                                                                                                                                                                                                                                                                                          into:
                                                                                                                                                                                                                                                                                                                                                                          let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                          +    = run
                                                                                                                                                                                                                                                                                                                                                                          +      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                          +       conflict = …}
                                                                                                                                                                                                                                                                                                                                                                          +      (List.take 5 ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                          +in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                          []
                                                                                                                                                                                                                                                                                                                                                                          rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                            forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                              (|List.take_2327/server| 5 sensors_1646/client)
                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                  +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                  +   …
                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (tuple_mk_2312/server Apple_1528/client Sharable_1534/client)
                                                                                                                                                                                                                                                                                                                                                                                    +                 (|::…
                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                      (|List.take_2327/server| 4 (|get.::.1_2295/server| sensors_1646/client))
                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                        +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                        +   …
                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                          (|Map.of_list_2320/server|
                                                                                                                                                                                                                                                                                                                                                                                          +  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                          +  (|::| (tuple_mk_2312/server Banana_1529/client U…
                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                            +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                            +   …
                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                              (|Map.of_list_2320/server|
                                                                                                                                                                                                                                                                                                                                                                                              +  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                              +  (|::| (tuple_mk_2312/server Orange_1530/client S…
                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                                +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                +   …
                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                                  +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                  +   …
                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                    (|Map.of_list_2320/server| Sharable_1534/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                                      +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                      +   …
                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                        (mk_agents_map_1621/client
                                                                                                                                                                                                                                                                                                                                                                                                        +  (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                                        +          (Node_1502/client F_1508/cl…
                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                                          +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                          +   …
                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                            (mk_agents_map_1621/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                              +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                              +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                  +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                  +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                    (|List.take_2327/server|
                                                                                                                                                                                                                                                                                                                                                                                                                    +  3
                                                                                                                                                                                                                                                                                                                                                                                                                    +  (|get.::.1_2295/server| (|get.::.1_2295/server| sensors_1646/client))…
                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                    • Sat (Some let sensors : int list = [(Z.of_nativeint (1n)); (Z.of_nativeint (2n))] +)
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +# Problem 2 + + +```ocaml +(* Example 2 *) + +let ex_2 = { + work_flow_1 = [A; B; C; A]; + work_flow_2 = [D; E; F; D]; + + agents=[ + + {agent_id=Node A; + guard=Eq(Sensor, 1); + accesses=Apple}; + + {agent_id=Node B; + guard=Eq(Sensor, 2); + accesses=Banana}; + + {agent_id=Node C; + guard=Eq(Sensor, 3); + accesses=Orange}; + + {agent_id=Node D; + guard=Eq(Sensor, 1); + accesses=Orange}; + + {agent_id=Node E; + guard=Eq(Sensor, 2); + accesses=Banana}; + + {agent_id=Node F; + guard=Eq(Sensor, 3); + accesses=Apple}; + + ]; + policy=(mk_policy + [(Apple, Unsharable); + (Banana, Sharable); + (Orange, Sharable)]); +} + +``` + + + + + val ex_2 : problem = + {work_flow_1 = [A;B;C;A]; work_flow_2 = [D;E;F;D]; + agents = + [{agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}; + {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}; + {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}; + {agent_id = Node D; guard = Eq (Sensor, 1); accesses = Orange}; + {agent_id = Node E; guard = Eq (Sensor, 2); accesses = Banana}; + {agent_id = Node F; guard = Eq (Sensor, 3); accesses = Apple}]; + policy = (Map.of_list ~default:Sharable [(Apple, Unsharable)])} + + + + + +```ocaml +instance (fun sensors -> conflict_reachable ex_2 sensors) +``` + + + + + - : Z.t list -> bool = + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    Unsatisfiable
                                                                                                                                                                                                                                                                                                                                                                                                                    proof
                                                                                                                                                                                                                                                                                                                                                                                                                    ground_instances:41
                                                                                                                                                                                                                                                                                                                                                                                                                    definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                    inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                    search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                    0.285s
                                                                                                                                                                                                                                                                                                                                                                                                                    details:
                                                                                                                                                                                                                                                                                                                                                                                                                    Expand
                                                                                                                                                                                                                                                                                                                                                                                                                    smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                    array def const:2
                                                                                                                                                                                                                                                                                                                                                                                                                    num checks:84
                                                                                                                                                                                                                                                                                                                                                                                                                    array sel const:399
                                                                                                                                                                                                                                                                                                                                                                                                                    array def store:426
                                                                                                                                                                                                                                                                                                                                                                                                                    array exp ax2:689
                                                                                                                                                                                                                                                                                                                                                                                                                    array splits:117
                                                                                                                                                                                                                                                                                                                                                                                                                    rlimit count:765729
                                                                                                                                                                                                                                                                                                                                                                                                                    array ext ax:54
                                                                                                                                                                                                                                                                                                                                                                                                                    mk clause:3597
                                                                                                                                                                                                                                                                                                                                                                                                                    array ax1:10
                                                                                                                                                                                                                                                                                                                                                                                                                    datatype occurs check:10642
                                                                                                                                                                                                                                                                                                                                                                                                                    mk bool var:24304
                                                                                                                                                                                                                                                                                                                                                                                                                    array ax2:2551
                                                                                                                                                                                                                                                                                                                                                                                                                    datatype splits:6758
                                                                                                                                                                                                                                                                                                                                                                                                                    decisions:34285
                                                                                                                                                                                                                                                                                                                                                                                                                    propagations:34283
                                                                                                                                                                                                                                                                                                                                                                                                                    conflicts:845
                                                                                                                                                                                                                                                                                                                                                                                                                    datatype accessor ax:1299
                                                                                                                                                                                                                                                                                                                                                                                                                    minimized lits:598
                                                                                                                                                                                                                                                                                                                                                                                                                    datatype constructor ax:16141
                                                                                                                                                                                                                                                                                                                                                                                                                    num allocs:1214194445
                                                                                                                                                                                                                                                                                                                                                                                                                    final checks:301
                                                                                                                                                                                                                                                                                                                                                                                                                    added eqs:167715
                                                                                                                                                                                                                                                                                                                                                                                                                    del clause:2650
                                                                                                                                                                                                                                                                                                                                                                                                                    time:0.006000
                                                                                                                                                                                                                                                                                                                                                                                                                    memory:41.160000
                                                                                                                                                                                                                                                                                                                                                                                                                    max memory:41.680000
                                                                                                                                                                                                                                                                                                                                                                                                                    Expand
                                                                                                                                                                                                                                                                                                                                                                                                                    • start[0.285s]
                                                                                                                                                                                                                                                                                                                                                                                                                      +  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                      +      = run
                                                                                                                                                                                                                                                                                                                                                                                                                      +        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                      +         conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                      +        (List.take … ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                      +  in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                    • simplify

                                                                                                                                                                                                                                                                                                                                                                                                                      into:
                                                                                                                                                                                                                                                                                                                                                                                                                      let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                      +    = run
                                                                                                                                                                                                                                                                                                                                                                                                                      +      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                      +       conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                      +      (List.take 5 ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                      +in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                      []
                                                                                                                                                                                                                                                                                                                                                                                                                      rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                        forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                          +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                          +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                            (|List.take_2447/server| 5 sensors_1649/client)
                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                              +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                              +   …
                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (tuple_mk_2432/server Apple_1528/client Unsharable_1535/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                +                 (|…
                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                  +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                  +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                    (|List.take_2447/server| 4 (|get.::.1_2415/server| sensors_1649/client))
                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                      +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                      +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                        (|Map.of_list_2440/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  (|::| (tuple_mk_2432/server Banana_1529/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                          +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                          +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                            +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                            +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                              (|Map.of_list_2440/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  (|::| (tuple_mk_2432/server Orange_1530/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                    (|Map.of_list_2440/server| Sharable_1534/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                        (|List.take_2447/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  3
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  (|get.::.1_2415/server| (|get.::.1_2415/server| sensors_1649/client))…
                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                            (mk_agents_map_1621/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          (Node_1502/client F_1508/cl…
                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                              (mk_agents_map_1621/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (|List.take_2447/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    (|get.::.1_2415/server| (|get.::.1_2415/s…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.0_2414/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.0_2414/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|Map.of_list_2440/server| Sharable_1534/client (|get.::.1_2437/server| |[]|))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +## This means no conflicts are possible for Problem 2! + +Imandra has *proved* that this goal is unsatisfiable, i.e., that no such conflict is possible. In fact, +we can use Imandra's *verify* command to restate this as a safety property and prove it: + + +```ocaml +verify (fun sensors -> not (conflict_reachable ex_2 sensors)) +``` + + + + + - : Z.t list -> bool = + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Proved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ground_instances:38
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          0.776s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array def const:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          num checks:78
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array sel const:1154
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array def store:2238
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array exp ax2:3272
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array splits:1246
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          rlimit count:3340081
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array ext ax:608
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          mk clause:10001
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array ax1:11
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype occurs check:37365
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          restarts:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          mk bool var:132443
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array ax2:5751
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype splits:47670
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          decisions:186847
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          propagations:123283
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          conflicts:1205
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype accessor ax:3241
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          minimized lits:655
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype constructor ax:104470
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          num allocs:1557465167
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          final checks:949
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          added eqs:608330
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          del clause:8676
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          time:0.001000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          memory:45.640000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          max memory:45.660000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • start[0.776s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +         conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        (List.take … ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • simplify

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +       conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      (List.take 5 ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (|List.take_2721/server| 5 sensors_1651/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (tuple_mk_2706/server Apple_1528/client Unsharable_1535/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +                 (|…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (|Map.of_list_2714/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  (|::| (tuple_mk_2706/server Banana_1529/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|Map.of_list_2714/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  (|::| (tuple_mk_2706/server Orange_1530/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (|List.take_2721/server| 4 (|get.::.1_2689/server| sensors_1651/client))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (|Map.of_list_2714/server| Sharable_1534/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (mk_agents_map_1621/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          (Node_1502/client F_1508/cl…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (mk_agents_map_1621/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (|List.take_2721/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  (|get.::.1_2689/server| (|get.::.1_2689/server| sensors_1651/client))…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (|Map.of_list_2714/server| Sharable_1534/client (|get.::.1_2711/server| |[]|))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.0_2688/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.0_2688/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (mk_agents_map_1621/client (|get.::.1_2704/server| |[]|))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (|List.take_2721/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    (|get.::.1_2689/server| (|get.::.1_2689/s…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.0_2688/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +## Problem 3: the use of OR in guards + +Finally, let's consider a problem in which we use the guard disjunctions (OR), which makes the search space quite a bit more complex. + + +```ocaml +(* Example 3 *) + +let ex_3 = { + work_flow_1 = [A; B; C; A]; + work_flow_2 = [D; E; F; D]; + + agents=[ + + {guard=Eq(Sensor, 1); + agent_id=Node A; + accesses=Apple}; + + {guard=Eq(Sensor, 2); + agent_id=Node B; + accesses=Banana}; + + {guard=Eq(Sensor, 3); + agent_id=Node C; + accesses=Orange}; + + {guard=Or(Eq(Sensor, 1), Eq(Sensor, 2)); + agent_id=Node D; + accesses=Orange}; + + {guard=Or(Eq(Sensor, 2), Eq(Sensor, 3)); + agent_id=Node E; + accesses=Banana}; + + {guard=Or(Eq(Sensor, 3), Eq(Sensor, 1)); + agent_id=Node F; + accesses=Apple}; + + ]; + policy=(mk_policy + [(Apple, Unsharable); + (Banana, Sharable); + (Orange, Sharable)]); +} +``` + + + + + val ex_3 : problem = + {work_flow_1 = [A;B;C;A]; work_flow_2 = [D;E;F;D]; + agents = + [{agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}; + {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}; + {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}; + {agent_id = Node D; guard = Or (Eq (Sensor, 1), Eq (Sensor, 2)); + accesses = Orange}; + {agent_id = Node E; guard = Or (Eq (Sensor, 2), Eq (Sensor, 3)); + accesses = Banana}; + {agent_id = Node F; guard = Or (Eq (Sensor, 3), Eq (Sensor, 1)); + accesses = Apple}]; + policy = (Map.of_list ~default:Sharable [(Apple, Unsharable)])} + + + + + +```ocaml +verify (fun sensors -> not (conflict_reachable ex_3 sensors)) +``` + + + + + - : Z.t list -> bool = + module CX : sig val sensors : Z.t list end + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Counterexample (after 38 steps, 0.883s):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +let sensors : int list = [2; 3; 1]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Refuted
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          proof attempt
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ground_instances:38
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          0.883s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array def const:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          num checks:77
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array sel const:656
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array def store:2094
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array exp ax2:2974
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array splits:668
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          rlimit count:4302953
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array ext ax:323
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          mk clause:8366
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array ax1:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype occurs check:40016
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          restarts:7
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          mk bool var:168851
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          array ax2:5134
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype splits:60871
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          decisions:253055
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          propagations:165932
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          conflicts:1140
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype accessor ax:1364
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          minimized lits:390
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype constructor ax:144727
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          num allocs:2447071197
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          final checks:1172
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          added eqs:703697
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          del clause:7054
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          time:0.003000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          memory:51.610000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          max memory:52.060000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • start[0.883s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +         conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        (List.take … ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • simplify

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +       conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      (List.take 5 ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|List.take_3271/server| 5 sensors_1656/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (tuple_mk_3256/server Apple_1528/client Unsharable_1535/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +                 (|…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (|List.take_3271/server| 4 (|get.::.1_3239/server| sensors_1656/client))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (|Map.of_list_3264/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  (|::| (tuple_mk_3256/server Banana_1529/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|Map.of_list_3264/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  (|::| (tuple_mk_3256/server Orange_1530/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (|Map.of_list_3264/server| Sharable_1534/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (mk_agents_map_1621/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (|List.take_3271/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  (|get.::.1_3239/server| (|get.::.1_3239/server| sensors_1656/client))…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|List.take_3271/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    (|get.::.1_3239/server| (|get.::.1_3239/s…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|Map.of_list_3264/server| Sharable_1534/client (|get.::.1_3261/server| |[]|))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.0_3238/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +             (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +               (|get.::.1_32…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.0_3238/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +             (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +               (|get.::.1_32…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +             (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +               (|get.::.1_32…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.0_3238/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +             (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +               (|get.::.1_32…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.0_3238/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +             (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +               (|get.::.1_32…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Sat (Some let sensors : int list = + [(Z.of_nativeint (2n)); (Z.of_nativeint (3n)); (Z.of_nativeint (1n))] +)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +As we can see, Imandra has proved for us that a conflict is possible for `ex_3`. It's a very nice +exercise to go through the counterexample manually and understand how this conflict occurs. We can also +use Imandra's concrete execution facilities to investigate the state for this conflict, by running the problem along the counterexample Imandra synthesized (`CX.sensors`): + + +```ocaml +run_problem ex_3 CX.sensors +``` + + + + + - : state * Z.t list = + ({wf_1 = [A;B;C;A]; wf_2 = [F;D]; sensor = Some 1; + agents = + (Map.of_list ~default:None + [(A, Some {agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}); + (B, Some {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}); + (C, Some {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}); + (D, + Some + {agent_id = Node D; guard = Or (Eq (Sensor, 1), Eq (Sensor, 2)); + accesses = Orange}); + (E, + Some + {agent_id = Node E; guard = Or (Eq (Sensor, 2), Eq (Sensor, 3)); + accesses = Banana}); + (F, + Some + {agent_id = Node F; guard = Or (Eq (Sensor, 3), Eq (Sensor, 1)); + accesses = Apple})]); + policy = (Map.of_list ~default:Sharable [(Apple, Unsharable)]); + conflict = Some (Node A, Node F, Apple)}, + []) + + + + +We can see that the conflict Imandra found, which happens with a sensor sequence of `[2;3;1]` results in +both `Node A` and `Node F` trying to access `Apple` at the same time, which is not allowed by the +resource access policy. + +You can modify these problems as you see fit and experiment with Imandra verifying or refuting conflict +safety. Happy reasoning! + + +```ocaml + +``` diff --git a/notebooks-src/imandra-conflict-detection.md b/notebooks-src/imandra-conflict-detection.md deleted file mode 100644 index c0187066..00000000 --- a/notebooks-src/imandra-conflict-detection.md +++ /dev/null @@ -1,2045 +0,0 @@ -# Imandra for automated conflict detection - -In this notebook, we will build an Imandra framework for reasoning about concurrent conflict detection. Once we encode this model in Imandra, we'll be able to use Imandra to automatically solve arbitrary problems about concurrent resource detection simply by encoding them in a simple datatype and asking Imandra if a conflict is possible. - -Let's begin with an informal description of the problem space. - -# Detecting resource conflicts over concurrent workflows - -Imagine there are two workflows, WF1 and WF2, that can each access Sharable and Unsharable resources. - -We define a conflict as any possible scenario in which WF1 and WF2 both access -an Unsharable resource at the same time. - -We want to prove that, for given definitions, a specific sequence of events will either -never lead to a conflict OR that there will be a conflict and at which event -would the conflict occur. - -We will - -## Imagine we have the following work-flows - -### WF1 -``` -A -> B -> C -> A -``` - -### WF2 -``` -D -> E -> F -> D -``` - -## Now, consider the following motivating problems - -### Problem 1 - -Assume that we have the following definitions: - -Node A -- Starts when `Sensor == 1` -- Accesses `Apple` - -Node B -- Starts when `Sensor == 2` -- Accesses `Banana` - -Node C -- Starts when `Sensor == 3` -- Accesses `Orange` - -Node D -- Starts when `Sensor == 1` -- Accesses `Orange` - -Node E -- Starts when `Sensor == 2` -- Accesses `Banana` - -Node F -- Starts when `Sensor == 3` -- Accesses `Apple` - -### Problem 1A -Suppose that we define our resources as such: - -Resources -- Apple: `Sharable` -- Banana: `Unsharable` -- Orange: `Sharable` - -If the following sequence of events is seen: -1. `Sensor = 1` (`WF1 -> A`) (`WF2 -> D`) -2. `Sensor = 2` (`WF1 -> B`) (`WF2 -> E`) - -Then `B` and `E` will access `Banana` (which is an Unsharable resource) at the same time, and there exists a sequence of events such that **a conflict is possible**. - -### Problem 1B -Suppose that we now define our resources as such: - -Resources -- Apple: `Unsharable` -- Banana: `Sharable` -- Orange: `Sharable` - -Then there is **no such sequence of events such that a conflict is possible**. - -### Problem 1C -Suppose we keep the resource definition as in 1B but now change the definition of the Nodes to be: - -Node D -- Starts when `Sensor == 1` OR `Sensor == 2` - -Node E -- Starts when `Sensor == 2` OR `Sensor == 3` - -Node F -- Starts when `Sensor == 3` OR `Sensor == 1` -- Accesses `Apple` - -If the following sequence of events is seen: -1. `Sensor = 2` (`WF2 -> D`) -2. `Sensor = 3` (`WF2 -> E`) -3. `Sensor = 1` (`WF2 -> F`) (`WF1 -> A`) - -Then `F` and `A` will access `Apple` (which is an Unsharable resource) at the same time, and there exists a sequence of events such that **a conflict is possible**. - -# Let's now build a framework in Imandra to allow us to answer these questions automatically - -We'll start with defining *agents*, *resources*, *guards* and *policies*. - - -```ocaml -type agent_id = - | Node of node_id - -and node_id = - A | B | C | D | E | F - -type guard = - | Eq of sensor * int - | Or of guard * guard - -and sensor = - | Sensor - -type resource = - | Apple - | Banana - | Orange - -type sharability = - | Sharable - | Unsharable - -type policy = - (resource, sharability) Map.t -``` - - - - - type agent_id = Node of node_id - and node_id = A | B | C | D | E | F - type guard = Eq of sensor * Z.t | Or of guard * guard - and sensor = Sensor - type resource = Apple | Banana | Orange - type sharability = Sharable | Unsharable - type policy = (resource, sharability) Map.t - - - - -# Problems - -Next, we'll define the *problem* datatype, which will allow us to succinctly express an arbitrary conflict detection problem of the above form to Imandra for analysis. - -As above, a problem will consist of a pair of workflows, a collection of agents (each with their own identities, guards and resource accesses) and a resource access policy specifying which resources can be shared. - - -```ocaml -type problem = { - work_flow_1: work_flow; - work_flow_2: work_flow; - agents: agent list; - policy: policy; -} - -and work_flow = node_id list - -and agent = { - agent_id: agent_id; - guard: guard; - accesses: resource; -} -``` - - - - - type problem = { - work_flow_1 : work_flow; - work_flow_2 : work_flow; - agents : agent list; - policy : policy; - } - and work_flow = node_id list - and agent = { agent_id : agent_id; guard : guard; accesses : resource; } - - - - -# Operational Semantics - -Next, we're going to encode the "meaning" or "semantics" of concurrent conflicts in Imandra by defining an *interpreter* which evaluates a problem over arbitrary states of the world. Then, we'll be able to use Imandra's symbolic reasoning power to prove or disprove the existence of a conflict for a given problem by asking it to symbolically evaluate all possible behaviors of the interpreter over a given problem specification. - -## State - -The `state` datatype will encode the current state of the world. This is core datatype over which a problem execution trace will take place. - -## Interpreter - -Armed with the `state` type, we will define an interpreter which accepts a problem and a sequence of sensor readings, and yields the result. - - -```ocaml -(* The current state of the world *) - -type state = { - wf_1: work_flow; - wf_2: work_flow; - sensor: int option; - agents: (node_id, agent option) Map.t; - policy: policy; - conflict: (agent_id * agent_id * resource) option; -} - -let rec eval_guard (sensor:int) (g:guard) = - match g with - | Eq (Sensor, n) -> sensor = n - | Or (g1, g2) -> - eval_guard sensor g1 || eval_guard sensor g2 - -let step (s:state) (sensor:int) = - let in_conflict r1 r2 policy = - r1 = r2 && Map.get r1 policy = Unsharable - in - match s.wf_1, s.wf_2 with - | agent_1 :: wf_1', agent_2 :: wf_2' -> - begin match Map.get agent_1 s.agents, Map.get agent_2 s.agents with - | Some actor_1, Some actor_2 -> - let g_1, g_2 = eval_guard sensor actor_1.guard, - eval_guard sensor actor_2.guard in - if g_1 && g_2 && in_conflict actor_1.accesses actor_2.accesses s.policy then ( - { s with - sensor = Some sensor; - conflict = Some (Node agent_1, Node agent_2, actor_1.accesses); - } - ) else ( - { s with - sensor = Some sensor; - wf_1 = if g_1 then wf_1' else s.wf_1; - wf_2 = if g_2 then wf_2' else s.wf_2; - } - ) - | _ -> s - end - | _ -> s - -let rec run (s:state) (sensors:int list) = - match sensors with - | [] -> (s, []) - | sensor :: sensors -> - let s' = step s sensor in - if s'.conflict = None then ( - run s' sensors - ) else ( - (s', sensors) - ) -[@@adm sensors] -``` - - - - - type state = { - wf_1 : work_flow; - wf_2 : work_flow; - sensor : Z.t option; - agents : (node_id, agent option) Map.t; - policy : policy; - conflict : (agent_id * agent_id * resource) option; - } - val eval_guard : Z.t -> guard -> bool = - val step : state -> Z.t -> state = - val run : state -> Z.t list -> state * Z.t list = - - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          termination proof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Termination proof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          call `eval_guard sensor (Destruct(Or, 0, g))` from `eval_guard sensor g`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          original:eval_guard sensor g
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          sub:eval_guard sensor (Destruct(Or, 0, g))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          original ordinal:Ordinal.Int (_cnt g)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          sub ordinal:Ordinal.Int (_cnt (Destruct(Or, 0, g)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          path:[not Is_a(Eq, g)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          proof:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          detailed proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ground_instances:3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          0.010s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          num checks:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          arith assert lower:11
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          arith tableau max rows:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          arith tableau max columns:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          arith pivots:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          rlimit count:5434
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          mk clause:24
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype occurs check:27
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          mk bool var:117
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          arith assert upper:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype splits:9
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          decisions:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          arith row summations:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          propagations:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          conflicts:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          arith fixed eqs:4
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype accessor ax:18
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          arith conflicts:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          arith num rows:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          datatype constructor ax:31
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          num allocs:23853164
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          final checks:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          added eqs:97
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          del clause:7
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          arith eq adapter:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          memory:17.130000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          max memory:17.130000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • start[0.010s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  let (_x_0 : int) = count.guard g in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  let (_x_1 : guard) = Destruct(Or, 0, g) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  let (_x_2 : int) = count.guard _x_1 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  let (_x_3 : bool) = Is_a(Eq, _x_1) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  not Is_a(Eq, g) && ((_x_0 >= 0) && (_x_2 >= 0))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  ==> (_x_3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -       && not (not (eval_guard sensor (Destruct(Or, 0, _x_1))) && not _x_3))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -      || Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            let (_x_0 : int) = count.guard g in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -let (_x_1 : guard) = Destruct(Or, 0, g) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -let (_x_2 : int) = count.guard _x_1 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -let (_x_3 : bool) = Is_a(Eq, _x_1) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -not (not Is_a(Eq, g) && (_x_0 >= 0) && (_x_2 >= 0))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -|| Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -|| (_x_3 && not (not (eval_guard sensor (Destruct(Or, 0, _x_1))) && not _x_3))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|Ordinal.<<| (|Ordinal.Int_79/boot|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                (|count.guard_1263/client| (|get.Or.0_549/serve…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (|count.guard_1263/client| (|get.Or.0_549/server| g_552/server))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (|count.guard_1263/client| g_552/server)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    call `eval_guard sensor (Destruct(Or, 1, g))` from `eval_guard sensor g`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    original:eval_guard sensor g
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    sub:eval_guard sensor (Destruct(Or, 1, g))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    original ordinal:Ordinal.Int (_cnt g)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    sub ordinal:Ordinal.Int (_cnt (Destruct(Or, 1, g)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    path:[not (eval_guard sensor (Destruct(Or, 0, g))) && not Is_a(Eq, g)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    proof:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    detailed proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ground_instances:3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0.012s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    num checks:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    arith assert lower:11
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    arith tableau max rows:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    arith tableau max columns:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    arith pivots:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    rlimit count:2742
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    mk clause:24
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    datatype occurs check:27
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    mk bool var:118
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    arith assert upper:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    datatype splits:9
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    decisions:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    arith row summations:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    propagations:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    conflicts:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    arith fixed eqs:4
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    datatype accessor ax:18
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    arith conflicts:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    arith num rows:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    datatype constructor ax:31
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    num allocs:17118784
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    final checks:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    added eqs:97
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    del clause:7
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    arith eq adapter:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    memory:17.130000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    max memory:17.130000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • start[0.012s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  let (_x_0 : int) = count.guard g in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  let (_x_1 : guard) = Destruct(Or, 1, g) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  let (_x_2 : int) = count.guard _x_1 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  let (_x_3 : bool) = Is_a(Eq, _x_1) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  not (eval_guard sensor (Destruct(Or, 0, g)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  && (not Is_a(Eq, g) && ((_x_0 >= 0) && (_x_2 >= 0)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  ==> (_x_3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -       && not (not (eval_guard sensor (Destruct(Or, 0, _x_1))) && not _x_3))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -      || Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      let (_x_0 : guard) = Destruct(Or, 1, g) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -let (_x_1 : bool) = Is_a(Eq, _x_0) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -let (_x_2 : int) = count.guard _x_0 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -let (_x_3 : int) = count.guard g in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -(_x_1 && not (not (eval_guard sensor (Destruct(Or, 0, _x_0))) && not _x_1))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -|| Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_3)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -|| not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -   (not (eval_guard sensor (Destruct(Or, 0, g))) && not Is_a(Eq, g)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -    && (_x_3 >= 0) && (_x_2 >= 0))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (|Ordinal.<<| (|Ordinal.Int_79/boot|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                (|count.guard_1263/client| (|get.Or.1_550/serve…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (|count.guard_1263/client| (|get.Or.1_550/server| g_552/server))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|count.guard_1263/client| g_552/server)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              termination proof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Termination proof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              call `run (step s (List.hd sensors)) (List.tl sensors)` from `run s sensors`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              original:run s sensors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              sub:run (step s (List.hd sensors)) (List.tl sensors)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              original ordinal:Ordinal.Int (_cnt sensors)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              sub ordinal:Ordinal.Int (_cnt (List.tl sensors))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              path:[(step s (List.hd sensors)).conflict = None && sensors <> []]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              proof:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              detailed proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ground_instances:3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              0.017s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              num checks:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              arith assert lower:12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              arith tableau max rows:5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              arith tableau max columns:16
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              arith pivots:13
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              rlimit count:17922
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              mk clause:204
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              datatype occurs check:299
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              mk bool var:1203
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              arith assert upper:14
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              datatype splits:309
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              decisions:456
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              arith row summations:23
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              arith bound prop:1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              propagations:523
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              conflicts:28
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              arith fixed eqs:5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              datatype accessor ax:153
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              minimized lits:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              arith conflicts:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              arith num rows:5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              arith assert diseq:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              datatype constructor ax:702
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              num allocs:33535690
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              final checks:14
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              added eqs:2994
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              del clause:9
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              arith eq adapter:13
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              memory:18.150000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              max memory:18.150000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • start[0.017s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  let (_x_0 : bool) = Is_a(Some, …) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  let (_x_1 : bool) = s.wf_1 <> [] in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  let (_x_2 : bool) = s.wf_2 <> [] in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  let (_x_3 : int) = count.list mk_nat sensors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  let (_x_4 : int list) = List.tl sensors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  let (_x_5 : int) = count.list mk_nat _x_4 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  let (_x_6 : state) = if _x_2 then … else s in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  ((if _x_2 then if _x_1 then if _x_0 then … else s else s else s).conflict
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -   = None)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  && (sensors <> [] && ((_x_3 >= 0) && (_x_5 >= 0)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  ==> not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -      (((if _x_6.wf_2 <> []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -         then if ….wf_1 <> [] then if _x_0 then … else … else _x_6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -         else if _x_2 then if _x_1 then … else s else s).conflict
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -        = None)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -       && _x_4 <> [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -      || Ordinal.( << ) (Ordinal.Int _x_5) (Ordinal.Int _x_3)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                let (_x_0 : int list) = List.tl sensors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -let (_x_1 : int) = count.list mk_nat _x_0 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -let (_x_2 : int) = count.list mk_nat sensors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -let (_x_3 : bool) = s.wf_1 <> [] in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -let (_x_4 : bool) = s.wf_2 <> [] in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -let (_x_5 : state) = if _x_4 then … else s in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -let (_x_6 : bool) = Is_a(Some, …) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -Ordinal.( << ) (Ordinal.Int _x_1) (Ordinal.Int _x_2)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -|| not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -   (((if _x_5.wf_2 <> []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -      then if ….wf_1 <> [] then if _x_6 then … else … else _x_5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -      else if _x_4 then if _x_3 then … else s else s).conflict
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -     = None)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -    && _x_0 <> [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -|| not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -   (((if _x_4 then if _x_3 then if _x_6 then … else s else s else s).conflict
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -     = None)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -    && sensors <> [] && (_x_2 >= 0) && (_x_1 >= 0))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (|Ordinal.<<| (|Ordinal.Int_79/boot|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                (|count.list_702/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                  (|ge…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (|count.list_702/server| (|get.::.1_684/server| sensors_690/server))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (|count.list_702/server| sensors_690/server)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        - - - -# Top-level problem interpreter and problem-specific conflict detection - -Next, we'll add the ability to define problems, run them and detect conflicts. - - -```ocaml -let rec mk_agents_map actors = - let agent_name = function Node a -> a in - match actors with - | [] -> Map.const None - | agent :: agents -> - Map.add (agent_name agent.agent_id) (Some agent) (mk_agents_map agents) - -(* Run a problem along sensor readings *) - -let run_problem (p:problem) sensors = - let init_state = { - wf_1 = p.work_flow_1; - wf_2 = p.work_flow_2; - sensor = None; - agents = mk_agents_map p.agents; - policy = p.policy; - conflict = None; - } in - run init_state sensors - -(* Is a conflict reachable from an initial state? *) - -let conflict_reachable ?(k=5) (p:problem) sensors = - let sensors = List.take k sensors in - let (s, sensors_left) = run_problem p sensors in - (s.conflict <> None && sensors_left = []) - -(* Make a policy from a list of declarations *) - -let mk_policy xs = - Map.of_list ~default:Sharable xs -``` - - - - - val mk_agents_map : agent list -> (node_id, agent option) Map.t = - val run_problem : problem -> Z.t list -> state * Z.t list = - val conflict_reachable : ?k:Z.t -> problem -> Z.t list -> bool = - val mk_policy : ('a * sharability) list -> ('a, sharability) Map.t = - - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        termination proof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Termination proof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        call `mk_agents_map (List.tl actors)` from `mk_agents_map actors`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        original:mk_agents_map actors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        sub:mk_agents_map (List.tl actors)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        original ordinal:Ordinal.Int (_cnt actors)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        sub ordinal:Ordinal.Int (_cnt (List.tl actors))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        path:[actors <> []]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        proof:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        detailed proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ground_instances:3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        0.012s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        num checks:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith assert lower:17
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith tableau max rows:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith tableau max columns:24
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith pivots:13
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        rlimit count:3758
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        mk clause:38
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        datatype occurs check:25
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        mk bool var:187
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith assert upper:12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        datatype splits:21
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        decisions:35
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith row summations:34
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        propagations:32
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        conflicts:11
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith fixed eqs:9
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        datatype accessor ax:30
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        minimized lits:1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith conflicts:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith num rows:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        datatype constructor ax:71
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        num allocs:81608215
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        final checks:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        added eqs:222
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        del clause:15
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith eq adapter:12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        memory:19.050000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        max memory:19.050000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • start[0.012s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  let (_x_0 : int) = count.list count.agent actors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  let (_x_1 : agent list) = List.tl actors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  let (_x_2 : int) = count.list count.agent _x_1 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  actors <> [] && ((_x_0 >= 0) && (_x_2 >= 0))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  ==> not (_x_1 <> [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -      || Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          let (_x_0 : agent list) = List.tl actors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -let (_x_1 : int) = count.list count.agent _x_0 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -let (_x_2 : int) = count.list count.agent actors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -not (_x_0 <> []) || Ordinal.( << ) (Ordinal.Int _x_1) (Ordinal.Int _x_2)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -|| not (actors <> [] && (_x_2 >= 0) && (_x_1 >= 0))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|Ordinal.<<| (|Ordinal.Int_79/boot|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                (|count.list_931/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                  (|ge…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|count.list_931/server| (|get.::.1_917/server| actors_920/server))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (|count.list_931/server| actors_920/server)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  - - - -# Now, let's encode some problems and check for conflicts! - -# Problem 1 - - -```ocaml -let ex_1 = { - work_flow_1 = [A; B; C; A]; - work_flow_2 = [D; E; F; D]; - agents=[ - - {agent_id=Node A; - guard=Eq(Sensor, 1); - accesses=Apple}; - - {agent_id=Node B; - guard=Eq(Sensor, 2); - accesses=Banana}; - - {agent_id=Node C; - guard=Eq(Sensor, 3); - accesses=Orange}; - - {agent_id=Node D; - guard=Eq(Sensor, 1); - accesses=Orange}; - - {agent_id=Node E; - guard=Eq(Sensor, 2); - accesses=Banana}; - - {agent_id=Node F; - guard=Eq(Sensor, 3); - accesses=Apple}; - - ]; - policy=(mk_policy - [(Apple, Sharable); - (Banana, Unsharable); - (Orange, Sharable)]); -} -``` - - - - - val ex_1 : problem = - {work_flow_1 = [A;B;C;A]; work_flow_2 = [D;E;F;D]; - agents = - [{agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}; - {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}; - {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}; - {agent_id = Node D; guard = Eq (Sensor, 1); accesses = Orange}; - {agent_id = Node E; guard = Eq (Sensor, 2); accesses = Banana}; - {agent_id = Node F; guard = Eq (Sensor, 3); accesses = Apple}]; - policy = (Map.of_list ~default:Sharable [(Banana, Unsharable)])} - - - - -# Is a conflict possible? Let's ask Imandra! - - -```ocaml -instance (fun sensors -> conflict_reachable ex_1 sensors) -``` - - - - - - : Z.t list -> bool = - module CX : sig val sensors : Z.t list end - - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Instance (after 21 steps, 0.058s):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -let sensors : int list = [1; 2]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Instance
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  proof attempt
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ground_instances:21
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0.058s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array def const:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  num checks:43
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array sel const:35
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array def store:141
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array exp ax2:259
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array splits:54
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rlimit count:91407
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array ext ax:29
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  mk clause:812
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array ax1:9
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype occurs check:4619
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  mk bool var:5169
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array ax2:345
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype splits:861
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  decisions:3346
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  propagations:2379
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  conflicts:156
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype accessor ax:271
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  minimized lits:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype constructor ax:2316
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  num allocs:105225016
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  final checks:159
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  added eqs:16592
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  del clause:579
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  time:0.002000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  memory:21.750000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  max memory:21.800000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • start[0.058s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -      = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -         conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -        (List.take … ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • simplify

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -    = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -       conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -      (List.take 5 ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (|List.take_1116/server| 5 sensors_1433/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (tuple_mk_1101/server Apple_1272/client Sharable_1278/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                 (|::…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|List.take_1116/server| 4 (|get.::.1_1084/server| sensors_1433/client))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (|Map.of_list_1109/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  Sharable_1278/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  (|::| (tuple_mk_1101/server Banana_1273/client U…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (|Map.of_list_1109/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -  Sharable_1278/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -  (|::| (tuple_mk_1101/server Orange_1274/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|Map.of_list_1109/server| Sharable_1278/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (mk_agents_map_1408/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -  (|::| (|rec_mk.agent_1091/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -          (Node_1246/client F_1252/cl…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (mk_agents_map_1408/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (|List.take_1116/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  (|get.::.1_1084/server| (|get.::.1_1084/server| sensors_1433/client))…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_1091/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Sat (Some let sensors : int list = [(Z.of_nativeint (1n)); (Z.of_nativeint (2n))] -)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - - - -# Problem 2 - - -```ocaml -(* Example 2 *) - -let ex_2 = { - work_flow_1 = [A; B; C; A]; - work_flow_2 = [D; E; F; D]; - - agents=[ - - {agent_id=Node A; - guard=Eq(Sensor, 1); - accesses=Apple}; - - {agent_id=Node B; - guard=Eq(Sensor, 2); - accesses=Banana}; - - {agent_id=Node C; - guard=Eq(Sensor, 3); - accesses=Orange}; - - {agent_id=Node D; - guard=Eq(Sensor, 1); - accesses=Orange}; - - {agent_id=Node E; - guard=Eq(Sensor, 2); - accesses=Banana}; - - {agent_id=Node F; - guard=Eq(Sensor, 3); - accesses=Apple}; - - ]; - policy=(mk_policy - [(Apple, Unsharable); - (Banana, Sharable); - (Orange, Sharable)]); -} - -``` - - - - - val ex_2 : problem = - {work_flow_1 = [A;B;C;A]; work_flow_2 = [D;E;F;D]; - agents = - [{agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}; - {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}; - {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}; - {agent_id = Node D; guard = Eq (Sensor, 1); accesses = Orange}; - {agent_id = Node E; guard = Eq (Sensor, 2); accesses = Banana}; - {agent_id = Node F; guard = Eq (Sensor, 3); accesses = Apple}]; - policy = (Map.of_list ~default:Sharable [(Apple, Unsharable)])} - - - - -Are conflicts possible? Let's ask Imandra! - - -```ocaml -instance (fun sensors -> conflict_reachable ex_2 sensors) -``` - - - - - - : Z.t list -> bool = - - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Unsatisfiable
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ground_instances:37
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0.727s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array def const:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                num checks:75
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array sel const:734
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array def store:1594
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array exp ax2:2235
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array splits:382
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                rlimit count:3193225
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array ext ax:192
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                mk clause:7686
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array ax1:9
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype occurs check:31464
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                restarts:5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                mk bool var:113837
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array ax2:4870
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype splits:31964
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                decisions:172099
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                propagations:116889
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                conflicts:1173
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype accessor ax:2542
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                minimized lits:621
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype constructor ax:95261
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                num allocs:186772757
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                final checks:798
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                added eqs:601779
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                del clause:6344
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                time:0.003000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                memory:27.810000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                max memory:27.900000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • start[0.727s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -      = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -         conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -        (List.take … ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -  in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • simplify

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -    = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -       conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -      (List.take 5 ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (|List.take_1244/server| 5 sensors_1436/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (tuple_mk_1229/server Apple_1272/client Unsharable_1279/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                 (|…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (|List.take_1244/server| 4 (|get.::.1_1212/server| sensors_1436/client))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (|Map.of_list_1237/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  Sharable_1278/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  (|::| (tuple_mk_1229/server Banana_1273/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (|Map.of_list_1237/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  Sharable_1278/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  (|::| (tuple_mk_1229/server Orange_1274/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|Map.of_list_1237/server| Sharable_1278/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (mk_agents_map_1408/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -          (Node_1246/client F_1252/cl…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (mk_agents_map_1408/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (|List.take_1244/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -  3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -  (|get.::.1_1212/server| (|get.::.1_1212/server| sensors_1436/client))…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (|List.take_1244/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -  2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -  (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -    (|get.::.1_1212/server| (|get.::.1_1212/s…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.0_1211/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -             (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -               (|get.::.1_12…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.0_1211/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -             (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -               (|get.::.1_12…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -             (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -               (|get.::.1_12…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -             (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -               (|get.::.1_12…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -             (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -               (|get.::.1_12…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -             (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -               (|get.::.1_12…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -             (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -               (|get.::.1_12…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_1219/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -             (|get.::.1_1212/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -               (|get.::.1_12…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              - - - -# This means no conflicts are possible for Problem 2! - -Imandra has *proved* that this goal is unsatisfiable, i.e., that no such conflict is possible. In fact, we can use Imandra's *verify* command to restate this as a safety property and prove it: - - -```ocaml -verify (fun sensors -> not (conflict_reachable ex_2 sensors)) -``` - - - - - - : Z.t list -> bool = - - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Proved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ground_instances:39
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              0.233s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              array def const:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              num checks:79
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              array sel const:270
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              array def store:340
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              array exp ax2:620
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              array splits:143
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              rlimit count:602884
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              array ext ax:57
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              mk clause:2812
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              array ax1:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              datatype occurs check:10617
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              restarts:1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              mk bool var:23138
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              array ax2:1808
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              datatype splits:5336
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              decisions:26717
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              propagations:26724
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              conflicts:646
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              datatype accessor ax:1702
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              minimized lits:511
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              datatype constructor ax:13332
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              num allocs:336747425
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              final checks:311
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              added eqs:129986
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              del clause:1974
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              time:0.003000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              memory:29.200000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              max memory:29.300000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • start[0.233s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -      = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -         conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -        (List.take … ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • simplify

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -    = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -       conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -      (List.take 5 ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (|List.take_1448/server| 5 sensors_1438/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (tuple_mk_1433/server Apple_1272/client Unsharable_1279/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                 (|…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (|List.take_1448/server| 4 (|get.::.1_1416/server| sensors_1438/client))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|Map.of_list_1441/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  Sharable_1278/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  (|::| (tuple_mk_1433/server Banana_1273/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (|Map.of_list_1441/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  Sharable_1278/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  (|::| (tuple_mk_1433/server Orange_1274/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (|Map.of_list_1441/server| Sharable_1278/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|List.take_1448/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  (|get.::.1_1416/server| (|get.::.1_1416/server| sensors_1438/client))…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (mk_agents_map_1408/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -          (Node_1246/client F_1252/cl…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (mk_agents_map_1408/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|List.take_1448/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -    (|get.::.1_1416/server| (|get.::.1_1416/s…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.0_1415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -             (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -               (|get.::.1_14…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.0_1415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -             (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -               (|get.::.1_14…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -             (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -               (|get.::.1_14…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -             (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -               (|get.::.1_14…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|Map.of_list_1441/server| Sharable_1278/client (|get.::.1_1438/server| |[]|))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -             (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -               (|get.::.1_14…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -             (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -               (|get.::.1_14…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -             (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -               (|get.::.1_14…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_1423/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                   (Node_1246/client E_1251/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -             (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -               (|get.::.1_14…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.0_1415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -             (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -               (|get.::.1_14…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.0_1415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -             (|get.::.1_1416/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -               (|get.::.1_14…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - - - -## Problem 3: the use of OR in guards - -Finally, let's consider a problem in which we use the guard disjunctions (OR), which makes the search space quite a bit more complex. - - -```ocaml -(* Example 3 *) - -let ex_3 = { - work_flow_1 = [A; B; C; A]; - work_flow_2 = [D; E; F; D]; - - agents=[ - - {guard=Eq(Sensor, 1); - agent_id=Node A; - accesses=Apple}; - - {guard=Eq(Sensor, 2); - agent_id=Node B; - accesses=Banana}; - - {guard=Eq(Sensor, 3); - agent_id=Node C; - accesses=Orange}; - - {guard=Or(Eq(Sensor, 1), Eq(Sensor, 2)); - agent_id=Node D; - accesses=Orange}; - - {guard=Or(Eq(Sensor, 2), Eq(Sensor, 3)); - agent_id=Node E; - accesses=Banana}; - - {guard=Or(Eq(Sensor, 3), Eq(Sensor, 1)); - agent_id=Node F; - accesses=Apple}; - - ]; - policy=(mk_policy - [(Apple, Unsharable); - (Banana, Sharable); - (Orange, Sharable)]); -} -``` - - - - - val ex_3 : problem = - {work_flow_1 = [A;B;C;A]; work_flow_2 = [D;E;F;D]; - agents = - [{agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}; - {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}; - {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}; - {agent_id = Node D; guard = Or (Eq (Sensor, 1), Eq (Sensor, 2)); - accesses = Orange}; - {agent_id = Node E; guard = Or (Eq (Sensor, 2), Eq (Sensor, 3)); - accesses = Banana}; - {agent_id = Node F; guard = Or (Eq (Sensor, 3), Eq (Sensor, 1)); - accesses = Apple}]; - policy = (Map.of_list ~default:Sharable [(Apple, Unsharable)])} - - - - - -```ocaml -verify (fun sensors -> not (conflict_reachable ex_3 sensors)) -``` - - - - - - : Z.t list -> bool = - module CX : sig val sensors : Z.t list end - - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Counterexample (after 34 steps, 0.202s):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -let sensors : int list = [2; 3; 1]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Refuted
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                proof attempt
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ground_instances:34
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0.202s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array def const:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                num checks:69
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array sel const:361
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array def store:384
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array exp ax2:654
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array splits:87
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                rlimit count:635962
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array ext ax:46
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                mk clause:2640
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array ax1:9
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype occurs check:9640
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                restarts:1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                mk bool var:18264
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array ax2:1724
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype splits:6273
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                decisions:30118
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                propagations:27353
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                conflicts:708
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype accessor ax:649
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                minimized lits:314
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype constructor ax:12841
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                num allocs:488776832
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                final checks:281
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                added eqs:132509
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                del clause:1776
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                time:0.008000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                memory:31.840000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                max memory:31.940000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • start[0.202s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -      = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -         conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -        (List.take … ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -  in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • simplify

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -    = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -       conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -      (List.take 5 ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (|List.take_1695/server| 5 sensors_1441/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (tuple_mk_1680/server Apple_1272/client Unsharable_1279/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                 (|…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (|List.take_1695/server| 4 (|get.::.1_1663/server| sensors_1441/client))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (|Map.of_list_1688/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  Sharable_1278/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  (|::| (tuple_mk_1680/server Banana_1273/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (|Map.of_list_1688/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  Sharable_1278/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  (|::| (tuple_mk_1680/server Orange_1274/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|Map.of_list_1688/server| Sharable_1278/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (mk_agents_map_1408/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (|List.take_1695/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  (|get.::.1_1663/server| (|get.::.1_1663/server| sensors_1441/client))…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (|List.take_1695/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -  2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -  (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -    (|get.::.1_1663/server| (|get.::.1_1663/s…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|get.::.0_1662/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -             (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -               (|get.::.1_16…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.0_1662/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -             (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -               (|get.::.1_16…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_1670/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                   (Node_1246/client F_1252/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1247/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                 (|::| B_1248/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -             (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -               (|get.::.1_16…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.0_1662/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -             (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -               (|get.::.1_16…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.0_1662/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -             (|get.::.1_1663/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -               (|get.::.1_16…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Sat (Some let sensors : int list = - [(Z.of_nativeint (2n)); (Z.of_nativeint (3n)); (Z.of_nativeint (1n))] -)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        - - - -As we can see, Imandra has proved for us that a conflict is possible for `ex_3`. It's a very nice exercise to go through the counterexample manually and understand how this conflict occurs. You can also use Imandra's concrete execution facilities to investigate the state for this conflict: - - -```ocaml -run_problem ex_3 CX.sensors -``` - - - - - - : state * Z.t list = - ({wf_1 = [A;B;C;A]; wf_2 = [F;D]; sensor = Some 1; - agents = - (Map.of_list ~default:None - [(A, Some {agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}); - (B, Some {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}); - (C, Some {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}); - (D, - Some - {agent_id = Node D; guard = Or (Eq (Sensor, 1), Eq (Sensor, 2)); - accesses = Orange}); - (E, - Some - {agent_id = Node E; guard = Or (Eq (Sensor, 2), Eq (Sensor, 3)); - accesses = Banana}); - (F, - Some - {agent_id = Node F; guard = Or (Eq (Sensor, 3), Eq (Sensor, 1)); - accesses = Apple})]); - policy = (Map.of_list ~default:Sharable [(Apple, Unsharable)]); - conflict = Some (Node A, Node F, Apple)}, - []) - - - - -We can see that the conflict Imandra found, which happens with a sensor sequence of `[2;3;1]` results in both `Node A` and `Node F` trying to access `Apple` at the same time, which is not allowed by the resource access policy. - -You can modify these problems as you see fit and experiment with Imandra verifying or refuting conflict safety. Happy reasoning! - - -```ocaml - -``` From 0b0f087acfffd59a94231ffbbf5d5f4a0935d9aa Mon Sep 17 00:00:00 2001 From: Grant Passmore Date: Wed, 15 Feb 2023 16:34:47 -0600 Subject: [PATCH 3/7] fix(md): use the right kind of MD export for the notebook --- .../Concurrent Conflict Detection.md | 2083 ----------------- notebooks-src/ConcurrentConflictDetection.md | 434 ++++ 2 files changed, 434 insertions(+), 2083 deletions(-) delete mode 100644 notebooks-src/Concurrent Conflict Detection.md create mode 100644 notebooks-src/ConcurrentConflictDetection.md diff --git a/notebooks-src/Concurrent Conflict Detection.md b/notebooks-src/Concurrent Conflict Detection.md deleted file mode 100644 index db4e4b10..00000000 --- a/notebooks-src/Concurrent Conflict Detection.md +++ /dev/null @@ -1,2083 +0,0 @@ -# Imandra for automated conflict detection - -In this notebook, we will build an Imandra framework for reasoning about concurrent conflict detection. Once we encode this model in Imandra, we'll be able to use Imandra to automatically solve arbitrary problems about concurrent resource detection simply by encoding them in a simple datatype and asking Imandra if a conflict is possible. - -Let's begin with an informal description of the problem space. - -# Detecting resource conflicts over concurrent workflows - -Imagine there are two workflows, WF1 and WF2, that can each access Sharable and Unsharable resources. - -We define a conflict as any possible scenario in which WF1 and WF2 both access -an Unsharable resource at the same time. - -For a given problem specification, we want to prove either that a conflict can never occur, or to prove that a conflict can occur and synthesize a witness (a sequence of events) realizing the conflict. - -## Imagine we have the following work-flows - -### WF1 -``` -A -> B -> C -> A -``` - -### WF2 -``` -D -> E -> F -> D -``` - -## Now, consider the following motivating problems - -### Problem 1 - -Assume that we have the following definitions: - -Node A -- Starts when `Sensor == 1` -- Accesses `Apple` - -Node B -- Starts when `Sensor == 2` -- Accesses `Banana` - -Node C -- Starts when `Sensor == 3` -- Accesses `Orange` - -Node D -- Starts when `Sensor == 1` -- Accesses `Orange` - -Node E -- Starts when `Sensor == 2` -- Accesses `Banana` - -Node F -- Starts when `Sensor == 3` -- Accesses `Apple` - -### Problem 1A -Suppose that we define our resources as such: - -Resources -- Apple: `Sharable` -- Banana: `Unsharable` -- Orange: `Sharable` - -If the following sequence of events is seen: -1. `Sensor = 1` (`WF1 -> A`) (`WF2 -> D`) -2. `Sensor = 2` (`WF1 -> B`) (`WF2 -> E`) - -Then `B` and `E` will access `Banana` (which is an Unsharable resource) at the same time, and there exists a sequence of events such that **a conflict is possible**. - -### Problem 1B -Suppose that we now define our resources as such: - -Resources -- Apple: `Unsharable` -- Banana: `Sharable` -- Orange: `Sharable` - -Then there is **no such sequence of events such that a conflict is possible**. - -### Problem 1C -Suppose we keep the resource definition as in 1B but now change the definition of the Nodes to be: - -Node D -- Starts when `Sensor == 1` OR `Sensor == 2` - -Node E -- Starts when `Sensor == 2` OR `Sensor == 3` - -Node F -- Starts when `Sensor == 3` OR `Sensor == 1` -- Accesses `Apple` - -If the following sequence of events is seen: -1. `Sensor = 2` (`WF2 -> D`) -2. `Sensor = 3` (`WF2 -> E`) -3. `Sensor = 1` (`WF2 -> F`) (`WF1 -> A`) - -Then `F` and `A` will access `Apple` (which is an Unsharable resource) at the same time, and there exists a sequence of events such that **a conflict is possible**. - -# Let's now build a framework in Imandra to allow us to answer these questions automatically - -We'll start with defining *agents*, *resources*, *guards* and *policies*. - - -```ocaml -type agent_id = - | Node of node_id - -and node_id = - A | B | C | D | E | F - -type guard = - | Eq of sensor * int - | Or of guard * guard - -and sensor = - | Sensor - -type resource = - | Apple - | Banana - | Orange - -type sharability = - | Sharable - | Unsharable - -type policy = - (resource, sharability) Map.t -``` - - - - - type agent_id = Node of node_id - and node_id = A | B | C | D | E | F - type guard = Eq of sensor * Z.t | Or of guard * guard - and sensor = Sensor - type resource = Apple | Banana | Orange - type sharability = Sharable | Unsharable - type policy = (resource, sharability) Map.t - - - - -# Problems - -Next, we'll define the *problem* datatype, which will allow us to succinctly express an arbitrary conflict detection problem of the above form to Imandra for analysis. - -As above, a problem will consist of a pair of workflows, a collection of agents (each with their own identities, guards and resource accesses) and a resource access policy specifying which resources can be shared. - - -```ocaml -type problem = { - work_flow_1: work_flow; - work_flow_2: work_flow; - agents: agent list; - policy: policy; -} - -and work_flow = node_id list - -and agent = { - agent_id: agent_id; - guard: guard; - accesses: resource; -} -``` - - - - - type problem = { - work_flow_1 : work_flow; - work_flow_2 : work_flow; - agents : agent list; - policy : policy; - } - and work_flow = node_id list - and agent = { agent_id : agent_id; guard : guard; accesses : resource; } - - - - -# Operational Semantics - -Next, we're going to encode the "meaning" or "semantics" of concurrent conflicts in Imandra by defining an *interpreter* which evaluates a problem over arbitrary states of the world. Then, we'll be able to use Imandra's symbolic reasoning power to prove or disprove the existence of a conflict for a given problem by asking it to symbolically evaluate all possible behaviors of the interpreter over a given problem specification. - -## State - -The `state` datatype will encode the current state of the world. This is core datatype over which a problem execution trace will take place. - -## Interpreter - -Armed with the `state` type, we will define an interpreter which accepts a problem and a sequence of sensor readings, and yields the result. - - -```ocaml -(* The current state of the world *) - -type state = { - wf_1: work_flow; - wf_2: work_flow; - sensor: int option; - agents: (node_id, agent option) Map.t; - policy: policy; - conflict: (agent_id * agent_id * resource) option; -} - -let rec eval_guard (sensor:int) (g:guard) = - match g with - | Eq (Sensor, n) -> sensor = n - | Or (g1, g2) -> - eval_guard sensor g1 || eval_guard sensor g2 - -let step (s:state) (sensor:int) = - let in_conflict r1 r2 policy = - r1 = r2 && Map.get r1 policy = Unsharable - in - match s.wf_1, s.wf_2 with - | agent_1 :: wf_1', agent_2 :: wf_2' -> - begin match Map.get agent_1 s.agents, Map.get agent_2 s.agents with - | Some actor_1, Some actor_2 -> - let g_1, g_2 = eval_guard sensor actor_1.guard, - eval_guard sensor actor_2.guard in - if g_1 && g_2 && in_conflict actor_1.accesses actor_2.accesses s.policy then ( - { s with - sensor = Some sensor; - conflict = Some (Node agent_1, Node agent_2, actor_1.accesses); - } - ) else ( - { s with - sensor = Some sensor; - wf_1 = if g_1 then wf_1' else s.wf_1; - wf_2 = if g_2 then wf_2' else s.wf_2; - } - ) - | _ -> s - end - | _ -> s - -let rec run (s:state) (sensors:int list) = - match sensors with - | [] -> (s, []) - | sensor :: sensors -> - let s' = step s sensor in - if s'.conflict = None then ( - run s' sensors - ) else ( - (s', sensors) - ) -[@@adm sensors] -``` - - - - - type state = { - wf_1 : work_flow; - wf_2 : work_flow; - sensor : Z.t option; - agents : (node_id, agent option) Map.t; - policy : policy; - conflict : (agent_id * agent_id * resource) option; - } - val eval_guard : Z.t -> guard -> bool = - val step : state -> Z.t -> state = - val run : state -> Z.t list -> state * Z.t list = - - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        termination proof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Termination proof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        call `eval_guard sensor (Destruct(Or, 0, g))` from `eval_guard sensor g`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        original:eval_guard sensor g
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        sub:eval_guard sensor (Destruct(Or, 0, g))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        original ordinal:Ordinal.Int (_cnt g)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        sub ordinal:Ordinal.Int (_cnt (Destruct(Or, 0, g)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        path:[not Is_a(Eq, g)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        proof:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        detailed proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ground_instances:3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        0.011s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        num checks:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith assert lower:11
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith tableau max rows:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith tableau max columns:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith pivots:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        rlimit count:5442
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        mk clause:24
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        datatype occurs check:27
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        mk bool var:117
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith assert upper:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        datatype splits:9
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        decisions:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith row summations:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        propagations:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        conflicts:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith fixed eqs:4
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        datatype accessor ax:18
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith conflicts:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith num rows:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        datatype constructor ax:31
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        num allocs:685043017
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        final checks:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        added eqs:97
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        del clause:7
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        arith eq adapter:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        memory:32.360000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        max memory:32.370000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • start[0.011s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  let (_x_0 : int) = count.guard g in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  let (_x_1 : guard) = Destruct(Or, 0, g) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  let (_x_2 : int) = count.guard _x_1 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  let (_x_3 : bool) = Is_a(Eq, _x_1) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  not Is_a(Eq, g) && ((_x_0 >= 0) && (_x_2 >= 0))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  ==> (_x_3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -       && not (not (eval_guard sensor (Destruct(Or, 0, _x_1))) && not _x_3))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -      || Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          let (_x_0 : int) = count.guard g in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -let (_x_1 : guard) = Destruct(Or, 0, g) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -let (_x_2 : int) = count.guard _x_1 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -let (_x_3 : bool) = Is_a(Eq, _x_1) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -not (not Is_a(Eq, g) && (_x_0 >= 0) && (_x_2 >= 0))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -|| Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -|| (_x_3 && not (not (eval_guard sensor (Destruct(Or, 0, _x_1))) && not _x_3))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|Ordinal.<<| (|Ordinal.Int_79/boot|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                (|count.guard_1519/client|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                  (|…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|count.guard_1519/client| (|get.Or.0_1913/server| g_1916/server))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (|count.guard_1519/client| g_1916/server)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  call `eval_guard sensor (Destruct(Or, 1, g))` from `eval_guard sensor g`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  original:eval_guard sensor g
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  sub:eval_guard sensor (Destruct(Or, 1, g))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  original ordinal:Ordinal.Int (_cnt g)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  sub ordinal:Ordinal.Int (_cnt (Destruct(Or, 1, g)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  path:[not (eval_guard sensor (Destruct(Or, 0, g))) && not Is_a(Eq, g)]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  proof:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  detailed proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ground_instances:3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0.011s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  num checks:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arith assert lower:11
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arith tableau max rows:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arith tableau max columns:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arith pivots:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rlimit count:2742
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  mk clause:24
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype occurs check:27
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  mk bool var:118
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arith assert upper:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype splits:9
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  decisions:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arith row summations:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  propagations:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  conflicts:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arith fixed eqs:4
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype accessor ax:18
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arith conflicts:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arith num rows:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype constructor ax:31
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  num allocs:617614653
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  final checks:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  added eqs:97
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  del clause:7
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  arith eq adapter:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  memory:32.370000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  max memory:32.370000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • start[0.011s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  let (_x_0 : int) = count.guard g in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  let (_x_1 : guard) = Destruct(Or, 1, g) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  let (_x_2 : int) = count.guard _x_1 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  let (_x_3 : bool) = Is_a(Eq, _x_1) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  not (eval_guard sensor (Destruct(Or, 0, g)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  && (not Is_a(Eq, g) && ((_x_0 >= 0) && (_x_2 >= 0)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  ==> (_x_3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -       && not (not (eval_guard sensor (Destruct(Or, 0, _x_1))) && not _x_3))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -      || Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    let (_x_0 : guard) = Destruct(Or, 1, g) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -let (_x_1 : bool) = Is_a(Eq, _x_0) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -let (_x_2 : int) = count.guard _x_0 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -let (_x_3 : int) = count.guard g in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -(_x_1 && not (not (eval_guard sensor (Destruct(Or, 0, _x_0))) && not _x_1))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -|| Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_3)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -|| not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -   (not (eval_guard sensor (Destruct(Or, 0, g))) && not Is_a(Eq, g)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -    && (_x_3 >= 0) && (_x_2 >= 0))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (|Ordinal.<<| (|Ordinal.Int_79/boot|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                (|count.guard_1519/client|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                  (|…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (|count.guard_1519/client| (|get.Or.1_1914/server| g_1916/server))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (|count.guard_1519/client| g_1916/server)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            termination proof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Termination proof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            call `run (step s (List.hd sensors)) (List.tl sensors)` from `run s sensors`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            original:run s sensors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            sub:run (step s (List.hd sensors)) (List.tl sensors)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            original ordinal:Ordinal.Int (_cnt sensors)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            sub ordinal:Ordinal.Int (_cnt (List.tl sensors))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            path:[(step s (List.hd sensors)).conflict = None && sensors <> []]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            proof:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            detailed proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ground_instances:3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            0.017s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            num checks:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            arith assert lower:30
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            arith tableau max rows:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            arith tableau max columns:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            arith pivots:19
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            rlimit count:17662
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            mk clause:222
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            datatype occurs check:268
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            mk bool var:1105
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            arith assert upper:25
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            datatype splits:290
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            decisions:450
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            arith row summations:28
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            arith bound prop:1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            propagations:550
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            conflicts:29
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            arith fixed eqs:14
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            datatype accessor ax:141
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            minimized lits:5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            arith conflicts:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            arith num rows:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            arith assert diseq:5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            datatype constructor ax:603
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            num allocs:768512040
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            final checks:13
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            added eqs:2772
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            del clause:21
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            arith eq adapter:25
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            memory:33.450000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            max memory:33.450000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • start[0.017s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -  let (_x_0 : bool) = Is_a(Some, …) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -  let (_x_1 : bool) = s.wf_1 <> [] in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -  let (_x_2 : bool) = s.wf_2 <> [] in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -  let (_x_3 : int) = count.list mk_nat sensors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -  let (_x_4 : int list) = List.tl sensors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -  let (_x_5 : int) = count.list mk_nat _x_4 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -  let (_x_6 : state) = if _x_2 then … else s in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -  ((if _x_2 then if _x_1 then if _x_0 then … else s else s else s).conflict
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -   = None)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -  && (sensors <> [] && ((_x_3 >= 0) && (_x_5 >= 0)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -  ==> not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -      (((if _x_6.wf_2 <> []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -         then if ….wf_1 <> [] then if _x_0 then … else … else _x_6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -         else if _x_2 then if _x_1 then … else s else s).conflict
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -        = None)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -       && _x_4 <> [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -      || Ordinal.( << ) (Ordinal.Int _x_5) (Ordinal.Int _x_3)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              let (_x_0 : int list) = List.tl sensors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -let (_x_1 : int) = count.list mk_nat _x_0 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -let (_x_2 : int) = count.list mk_nat sensors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -let (_x_3 : bool) = s.wf_1 <> [] in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -let (_x_4 : bool) = s.wf_2 <> [] in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -let (_x_5 : state) = if _x_4 then … else s in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -let (_x_6 : bool) = Is_a(Some, …) in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -Ordinal.( << ) (Ordinal.Int _x_1) (Ordinal.Int _x_2)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -|| not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -   (((if _x_5.wf_2 <> []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -      then if ….wf_1 <> [] then if _x_6 then … else … else _x_5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -      else if _x_4 then if _x_3 then … else s else s).conflict
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -     = None)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -    && _x_0 <> [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -|| not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -   (((if _x_4 then if _x_3 then if _x_6 then … else s else s else s).conflict
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -     = None)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -    && sensors <> [] && (_x_2 >= 0) && (_x_1 >= 0))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (|Ordinal.<<| (|Ordinal.Int_79/boot|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                (|count.list_2066/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                  (|g…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (|count.list_2066/server| (|get.::.1_2048/server| sensors_2054/server))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (|count.list_2066/server| sensors_2054/server)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      - - - -# Top-level problem runner and problem-specific conflict detection - -Next, we'll add the ability to define problems, run them and detect conflicts. - - -```ocaml -let rec mk_agents_map actors = - let agent_name = function Node a -> a in - match actors with - | [] -> Map.const None - | agent :: agents -> - Map.add (agent_name agent.agent_id) (Some agent) (mk_agents_map agents) - -(* Run a problem along sensor readings *) - -let run_problem (p:problem) sensors = - let init_state = { - wf_1 = p.work_flow_1; - wf_2 = p.work_flow_2; - sensor = None; - agents = mk_agents_map p.agents; - policy = p.policy; - conflict = None; - } in - run init_state sensors - -(* Is a conflict reachable from an initial state? *) - -let conflict_reachable ?(k=5) (p:problem) sensors = - let sensors = List.take k sensors in - let (s, sensors_left) = run_problem p sensors in - (s.conflict <> None && sensors_left = []) - -(* Make a policy from a list of declarations *) - -let mk_policy xs = - Map.of_list ~default:Sharable xs -``` - - - - - val mk_agents_map : agent list -> (node_id, agent option) Map.t = - val run_problem : problem -> Z.t list -> state * Z.t list = - val conflict_reachable : ?k:Z.t -> problem -> Z.t list -> bool = - val mk_policy : ('a * sharability) list -> ('a, sharability) Map.t = - - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      termination proof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Termination proof

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      call `mk_agents_map (List.tl actors)` from `mk_agents_map actors`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      original:mk_agents_map actors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      sub:mk_agents_map (List.tl actors)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      original ordinal:Ordinal.Int (_cnt actors)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      sub ordinal:Ordinal.Int (_cnt (List.tl actors))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      path:[actors <> []]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      proof:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      detailed proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ground_instances:3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      0.012s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      num checks:8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      arith assert lower:17
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      arith tableau max rows:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      arith tableau max columns:24
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      arith pivots:13
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      rlimit count:3758
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      mk clause:38
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      datatype occurs check:25
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      mk bool var:187
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      arith assert upper:12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      datatype splits:21
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      decisions:35
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      arith row summations:34
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      propagations:32
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      conflicts:11
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      arith fixed eqs:9
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      datatype accessor ax:30
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      minimized lits:1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      arith conflicts:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      arith num rows:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      datatype constructor ax:71
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      num allocs:846908204
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      final checks:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      added eqs:222
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      del clause:15
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      arith eq adapter:12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      memory:33.340000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      max memory:33.450000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • start[0.012s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -  let (_x_0 : int) = count.list count.agent actors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -  let (_x_1 : agent list) = List.tl actors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -  let (_x_2 : int) = count.list count.agent _x_1 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -  actors <> [] && ((_x_0 >= 0) && (_x_2 >= 0))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -  ==> not (_x_1 <> [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -      || Ordinal.( << ) (Ordinal.Int _x_2) (Ordinal.Int _x_0)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • simplify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        let (_x_0 : agent list) = List.tl actors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -let (_x_1 : int) = count.list count.agent _x_0 in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -let (_x_2 : int) = count.list count.agent actors in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -not (_x_0 <> []) || Ordinal.( << ) (Ordinal.Int _x_1) (Ordinal.Int _x_2)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -|| not (actors <> [] && (_x_2 >= 0) && (_x_1 >= 0))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (|Ordinal.<<| (|Ordinal.Int_79/boot|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                (|count.list_2142/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                  (|g…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|count.list_2142/server| (|get.::.1_2128/server| actors_2131/server))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|count.list_2142/server| actors_2131/server)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - - - -# Now, let's encode some problems and check for conflicts! - -# Problem 1 - - -```ocaml -let ex_1 = { - work_flow_1 = [A; B; C; A]; - work_flow_2 = [D; E; F; D]; - agents=[ - - {agent_id=Node A; - guard=Eq(Sensor, 1); - accesses=Apple}; - - {agent_id=Node B; - guard=Eq(Sensor, 2); - accesses=Banana}; - - {agent_id=Node C; - guard=Eq(Sensor, 3); - accesses=Orange}; - - {agent_id=Node D; - guard=Eq(Sensor, 1); - accesses=Orange}; - - {agent_id=Node E; - guard=Eq(Sensor, 2); - accesses=Banana}; - - {agent_id=Node F; - guard=Eq(Sensor, 3); - accesses=Apple}; - - ]; - policy=(mk_policy - [(Apple, Sharable); - (Banana, Unsharable); - (Orange, Sharable)]); -} -``` - - - - - val ex_1 : problem = - {work_flow_1 = [A;B;C;A]; work_flow_2 = [D;E;F;D]; - agents = - [{agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}; - {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}; - {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}; - {agent_id = Node D; guard = Eq (Sensor, 1); accesses = Orange}; - {agent_id = Node E; guard = Eq (Sensor, 2); accesses = Banana}; - {agent_id = Node F; guard = Eq (Sensor, 3); accesses = Apple}]; - policy = (Map.of_list ~default:Sharable [(Banana, Unsharable)])} - - - - -# Is a conflict possible? Let's ask Imandra! - - -```ocaml -instance (fun sensors -> conflict_reachable ex_1 sensors) -``` - - - - - - : Z.t list -> bool = - module CX : sig val sensors : Z.t list end - - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Instance (after 20 steps, 0.052s):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -let sensors : int list = [1; 2]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Instance
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                proof attempt
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ground_instances:20
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0.052s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array def const:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                num checks:41
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array sel const:49
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array def store:119
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array exp ax2:208
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array splits:49
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                rlimit count:90757
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array ext ax:27
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                mk clause:714
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array ax1:9
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype occurs check:3861
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                mk bool var:4711
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array ax2:357
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype splits:880
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                decisions:3574
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                propagations:2772
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                conflicts:149
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype accessor ax:220
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                minimized lits:42
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                datatype constructor ax:2343
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                num allocs:962813774
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                final checks:134
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                added eqs:16165
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                del clause:480
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                time:0.002000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                memory:36.100000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                max memory:36.150000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • start[0.052s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -      = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -         conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -        (List.take … ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -  in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • simplify

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -    = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -       conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -      (List.take 5 ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (|List.take_2327/server| 5 sensors_1646/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (tuple_mk_2312/server Apple_1528/client Sharable_1534/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                 (|::…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|List.take_2327/server| 4 (|get.::.1_2295/server| sensors_1646/client))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (|Map.of_list_2320/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -  (|::| (tuple_mk_2312/server Banana_1529/client U…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (|Map.of_list_2320/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  (|::| (tuple_mk_2312/server Orange_1530/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (|Map.of_list_2320/server| Sharable_1534/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (mk_agents_map_1621/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -          (Node_1502/client F_1508/cl…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_2302/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (mk_agents_map_1621/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (|List.take_2327/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  (|get.::.1_2295/server| (|get.::.1_2295/server| sensors_1646/client))…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Sat (Some let sensors : int list = [(Z.of_nativeint (1n)); (Z.of_nativeint (2n))] -)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            - - - -# Problem 2 - - -```ocaml -(* Example 2 *) - -let ex_2 = { - work_flow_1 = [A; B; C; A]; - work_flow_2 = [D; E; F; D]; - - agents=[ - - {agent_id=Node A; - guard=Eq(Sensor, 1); - accesses=Apple}; - - {agent_id=Node B; - guard=Eq(Sensor, 2); - accesses=Banana}; - - {agent_id=Node C; - guard=Eq(Sensor, 3); - accesses=Orange}; - - {agent_id=Node D; - guard=Eq(Sensor, 1); - accesses=Orange}; - - {agent_id=Node E; - guard=Eq(Sensor, 2); - accesses=Banana}; - - {agent_id=Node F; - guard=Eq(Sensor, 3); - accesses=Apple}; - - ]; - policy=(mk_policy - [(Apple, Unsharable); - (Banana, Sharable); - (Orange, Sharable)]); -} - -``` - - - - - val ex_2 : problem = - {work_flow_1 = [A;B;C;A]; work_flow_2 = [D;E;F;D]; - agents = - [{agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}; - {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}; - {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}; - {agent_id = Node D; guard = Eq (Sensor, 1); accesses = Orange}; - {agent_id = Node E; guard = Eq (Sensor, 2); accesses = Banana}; - {agent_id = Node F; guard = Eq (Sensor, 3); accesses = Apple}]; - policy = (Map.of_list ~default:Sharable [(Apple, Unsharable)])} - - - - - -```ocaml -instance (fun sensors -> conflict_reachable ex_2 sensors) -``` - - - - - - : Z.t list -> bool = - - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Unsatisfiable
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ground_instances:41
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            0.285s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            array def const:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            num checks:84
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            array sel const:399
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            array def store:426
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            array exp ax2:689
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            array splits:117
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            rlimit count:765729
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            array ext ax:54
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            mk clause:3597
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            array ax1:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            datatype occurs check:10642
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            mk bool var:24304
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            array ax2:2551
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            datatype splits:6758
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            decisions:34285
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            propagations:34283
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            conflicts:845
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            datatype accessor ax:1299
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            minimized lits:598
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            datatype constructor ax:16141
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            num allocs:1214194445
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            final checks:301
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            added eqs:167715
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            del clause:2650
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            time:0.006000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            memory:41.160000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            max memory:41.680000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • start[0.285s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -      = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -         conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -        (List.take … ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -  in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • simplify

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -    = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -       conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -      (List.take 5 ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -in not (_x_0.0.conflict = …) && (_x_0.1 = [])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (|List.take_2447/server| 5 sensors_1649/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (tuple_mk_2432/server Apple_1528/client Unsharable_1535/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                 (|…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (|List.take_2447/server| 4 (|get.::.1_2415/server| sensors_1649/client))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|Map.of_list_2440/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  (|::| (tuple_mk_2432/server Banana_1529/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (|Map.of_list_2440/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  (|::| (tuple_mk_2432/server Orange_1530/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (|Map.of_list_2440/server| Sharable_1534/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|List.take_2447/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  (|get.::.1_2415/server| (|get.::.1_2415/server| sensors_1649/client))…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (mk_agents_map_1621/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -          (Node_1502/client F_1508/cl…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (mk_agents_map_1621/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|List.take_2447/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -    (|get.::.1_2415/server| (|get.::.1_2415/s…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.0_2414/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.0_2414/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (|Map.of_list_2440/server| Sharable_1534/client (|get.::.1_2437/server| |[]|))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -             (|get.::.1_2415/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -               (|get.::.1_24…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_2422/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  - - - -## This means no conflicts are possible for Problem 2! - -Imandra has *proved* that this goal is unsatisfiable, i.e., that no such conflict is possible. In fact, -we can use Imandra's *verify* command to restate this as a safety property and prove it: - - -```ocaml -verify (fun sensors -> not (conflict_reachable ex_2 sensors)) -``` - - - - - - : Z.t list -> bool = - - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Proved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  proof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ground_instances:38
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0.776s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array def const:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  num checks:78
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array sel const:1154
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array def store:2238
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array exp ax2:3272
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array splits:1246
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rlimit count:3340081
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array ext ax:608
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  mk clause:10001
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array ax1:11
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype occurs check:37365
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  restarts:6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  mk bool var:132443
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array ax2:5751
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype splits:47670
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  decisions:186847
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  propagations:123283
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  conflicts:1205
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype accessor ax:3241
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  minimized lits:655
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype constructor ax:104470
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  num allocs:1557465167
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  final checks:949
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  added eqs:608330
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  del clause:8676
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  time:0.001000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  memory:45.640000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  max memory:45.660000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • start[0.776s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -      = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -         conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -        (List.take … ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • simplify

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -    = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -       conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -      (List.take 5 ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (|List.take_2721/server| 5 sensors_1651/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (tuple_mk_2706/server Apple_1528/client Unsharable_1535/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                 (|…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (|Map.of_list_2714/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -  (|::| (tuple_mk_2706/server Banana_1529/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (|Map.of_list_2714/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  (|::| (tuple_mk_2706/server Orange_1530/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (|List.take_2721/server| 4 (|get.::.1_2689/server| sensors_1651/client))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (|Map.of_list_2714/server| Sharable_1534/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (mk_agents_map_1621/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -  (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -          (Node_1502/client F_1508/cl…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (mk_agents_map_1621/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (|List.take_2721/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  (|get.::.1_2689/server| (|get.::.1_2689/server| sensors_1651/client))…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|Map.of_list_2714/server| Sharable_1534/client (|get.::.1_2711/server| |[]|))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.0_2688/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.0_2688/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (mk_agents_map_1621/client (|get.::.1_2704/server| |[]|))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (|List.take_2721/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -  (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -    (|get.::.1_2689/server| (|get.::.1_2689/s…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.0_2688/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_2696/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                   (Node_1502/client E_1507/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -             (|get.::.1_2689/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -               (|get.::.1_26…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Unsat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  - - - -## Problem 3: the use of OR in guards - -Finally, let's consider a problem in which we use the guard disjunctions (OR), which makes the search space quite a bit more complex. - - -```ocaml -(* Example 3 *) - -let ex_3 = { - work_flow_1 = [A; B; C; A]; - work_flow_2 = [D; E; F; D]; - - agents=[ - - {guard=Eq(Sensor, 1); - agent_id=Node A; - accesses=Apple}; - - {guard=Eq(Sensor, 2); - agent_id=Node B; - accesses=Banana}; - - {guard=Eq(Sensor, 3); - agent_id=Node C; - accesses=Orange}; - - {guard=Or(Eq(Sensor, 1), Eq(Sensor, 2)); - agent_id=Node D; - accesses=Orange}; - - {guard=Or(Eq(Sensor, 2), Eq(Sensor, 3)); - agent_id=Node E; - accesses=Banana}; - - {guard=Or(Eq(Sensor, 3), Eq(Sensor, 1)); - agent_id=Node F; - accesses=Apple}; - - ]; - policy=(mk_policy - [(Apple, Unsharable); - (Banana, Sharable); - (Orange, Sharable)]); -} -``` - - - - - val ex_3 : problem = - {work_flow_1 = [A;B;C;A]; work_flow_2 = [D;E;F;D]; - agents = - [{agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}; - {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}; - {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}; - {agent_id = Node D; guard = Or (Eq (Sensor, 1), Eq (Sensor, 2)); - accesses = Orange}; - {agent_id = Node E; guard = Or (Eq (Sensor, 2), Eq (Sensor, 3)); - accesses = Banana}; - {agent_id = Node F; guard = Or (Eq (Sensor, 3), Eq (Sensor, 1)); - accesses = Apple}]; - policy = (Map.of_list ~default:Sharable [(Apple, Unsharable)])} - - - - - -```ocaml -verify (fun sensors -> not (conflict_reachable ex_3 sensors)) -``` - - - - - - : Z.t list -> bool = - module CX : sig val sensors : Z.t list end - - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Counterexample (after 38 steps, 0.883s):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -let sensors : int list = [2; 3; 1]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  - - - - -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Refuted
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  proof attempt
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ground_instances:38
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  definitions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  inductions:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  search_time:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  0.883s
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  details:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  smt_stats:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array def const:2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  num checks:77
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array sel const:656
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array def store:2094
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array exp ax2:2974
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array splits:668
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rlimit count:4302953
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array ext ax:323
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  mk clause:8366
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array ax1:10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype occurs check:40016
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  restarts:7
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  mk bool var:168851
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  array ax2:5134
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype splits:60871
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  decisions:253055
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  propagations:165932
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  conflicts:1140
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype accessor ax:1364
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  minimized lits:390
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatype constructor ax:144727
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  num allocs:2447071197
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  final checks:1172
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  added eqs:703697
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  del clause:7054
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  time:0.003000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  memory:51.610000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  max memory:52.060000
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Expand
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • start[0.883s]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -      = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -        {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -         conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -        (List.take … ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • simplify

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    into:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    let (_x_0 : (state * int list))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -    = run
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -      {wf_1 = …; wf_2 = …; sensor = …; agents = …; policy = …;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -       conflict = …}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -      (List.take 5 ( :var_0: ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -in not (not (_x_0.0.conflict = …) && (_x_0.1 = []))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    rewrite_steps:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      forward_chaining:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (|List.take_3271/server| 5 sensors_1656/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (tuple_mk_3256/server Apple_1528/client Unsharable_1535/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                 (|…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (|List.take_3271/server| 4 (|get.::.1_3239/server| sensors_1656/client))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (|Map.of_list_3264/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -  (|::| (tuple_mk_3256/server Banana_1529/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (|Map.of_list_3264/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -  Sharable_1534/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -  (|::| (tuple_mk_3256/server Orange_1530/client S…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (|Map.of_list_3264/server| Sharable_1534/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (mk_agents_map_1621/client |[]|)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (|List.take_3271/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -  (|get.::.1_3239/server| (|get.::.1_3239/server| sensors_1656/client))…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (|List.take_3271/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -  (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -    (|get.::.1_3239/server| (|get.::.1_3239/s…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (|Map.of_list_3264/server| Sharable_1534/client (|get.::.1_3261/server| |[]|))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|get.::.0_3238/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -             (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -               (|get.::.1_32…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|get.::.0_3238/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -             (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -               (|get.::.1_32…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (let ((a!1 (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -             (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      -               (|get.::.1_32…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (let ((a!1 (|get.::.0_3238/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -             (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -               (|get.::.1_32…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (let ((a!1 (|::| (|rec_mk.agent_3246/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -                   (Node_1502/client F_1508/client)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -   …
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (let ((a!1 (|::| A_1503/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                 (|::| B_1504/client
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                -                       (|::| C_1…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • unroll
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expr:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (let ((a!1 (|get.::.0_3238/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -             (|get.::.1_3239/server|
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -               (|get.::.1_32…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  expansions:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Sat (Some let sensors : int list = - [(Z.of_nativeint (2n)); (Z.of_nativeint (3n)); (Z.of_nativeint (1n))] -)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  - - - -As we can see, Imandra has proved for us that a conflict is possible for `ex_3`. It's a very nice -exercise to go through the counterexample manually and understand how this conflict occurs. We can also -use Imandra's concrete execution facilities to investigate the state for this conflict, by running the problem along the counterexample Imandra synthesized (`CX.sensors`): - - -```ocaml -run_problem ex_3 CX.sensors -``` - - - - - - : state * Z.t list = - ({wf_1 = [A;B;C;A]; wf_2 = [F;D]; sensor = Some 1; - agents = - (Map.of_list ~default:None - [(A, Some {agent_id = Node A; guard = Eq (Sensor, 1); accesses = Apple}); - (B, Some {agent_id = Node B; guard = Eq (Sensor, 2); accesses = Banana}); - (C, Some {agent_id = Node C; guard = Eq (Sensor, 3); accesses = Orange}); - (D, - Some - {agent_id = Node D; guard = Or (Eq (Sensor, 1), Eq (Sensor, 2)); - accesses = Orange}); - (E, - Some - {agent_id = Node E; guard = Or (Eq (Sensor, 2), Eq (Sensor, 3)); - accesses = Banana}); - (F, - Some - {agent_id = Node F; guard = Or (Eq (Sensor, 3), Eq (Sensor, 1)); - accesses = Apple})]); - policy = (Map.of_list ~default:Sharable [(Apple, Unsharable)]); - conflict = Some (Node A, Node F, Apple)}, - []) - - - - -We can see that the conflict Imandra found, which happens with a sensor sequence of `[2;3;1]` results in -both `Node A` and `Node F` trying to access `Apple` at the same time, which is not allowed by the -resource access policy. - -You can modify these problems as you see fit and experiment with Imandra verifying or refuting conflict -safety. Happy reasoning! - - -```ocaml - -``` diff --git a/notebooks-src/ConcurrentConflictDetection.md b/notebooks-src/ConcurrentConflictDetection.md new file mode 100644 index 00000000..7617b534 --- /dev/null +++ b/notebooks-src/ConcurrentConflictDetection.md @@ -0,0 +1,434 @@ +# Imandra for automated conflict detection + +In this notebook, we will build an Imandra framework for reasoning about concurrent conflict detection. Once we encode this model in Imandra, we'll be able to use Imandra to automatically solve arbitrary problems about concurrent resource detection simply by encoding them in a simple datatype and asking Imandra if a conflict is possible. + +Let's begin with an informal description of the problem space. + +# Detecting resource conflicts over concurrent workflows + +Imagine there are two workflows, WF1 and WF2, that can each access Sharable and Unsharable resources. + +We define a conflict as any possible scenario in which WF1 and WF2 both access +an Unsharable resource at the same time. + +For a given problem specification, we want to prove either that a conflict can never occur, or to prove that a conflict can occur and synthesize a witness (a sequence of events) realizing the conflict. + +## Imagine we have the following work-flows + +### WF1 +``` +A -> B -> C -> A +``` + +### WF2 +``` +D -> E -> F -> D +``` + +## Now, consider the following motivating problems + +### Problem 1 + +Assume that we have the following definitions: + +Node A +- Starts when `Sensor == 1` +- Accesses `Apple` + +Node B +- Starts when `Sensor == 2` +- Accesses `Banana` + +Node C +- Starts when `Sensor == 3` +- Accesses `Orange` + +Node D +- Starts when `Sensor == 1` +- Accesses `Orange` + +Node E +- Starts when `Sensor == 2` +- Accesses `Banana` + +Node F +- Starts when `Sensor == 3` +- Accesses `Apple` + +### Problem 1A +Suppose that we define our resources as such: + +Resources +- Apple: `Sharable` +- Banana: `Unsharable` +- Orange: `Sharable` + +If the following sequence of events is seen: +1. `Sensor = 1` (`WF1 -> A`) (`WF2 -> D`) +2. `Sensor = 2` (`WF1 -> B`) (`WF2 -> E`) + +Then `B` and `E` will access `Banana` (which is an Unsharable resource) at the same time, and there exists a sequence of events such that **a conflict is possible**. + +### Problem 1B +Suppose that we now define our resources as such: + +Resources +- Apple: `Unsharable` +- Banana: `Sharable` +- Orange: `Sharable` + +Then there is **no such sequence of events such that a conflict is possible**. + +### Problem 1C +Suppose we keep the resource definition as in 1B but now change the definition of the Nodes to be: + +Node D +- Starts when `Sensor == 1` OR `Sensor == 2` + +Node E +- Starts when `Sensor == 2` OR `Sensor == 3` + +Node F +- Starts when `Sensor == 3` OR `Sensor == 1` +- Accesses `Apple` + +If the following sequence of events is seen: +1. `Sensor = 2` (`WF2 -> D`) +2. `Sensor = 3` (`WF2 -> E`) +3. `Sensor = 1` (`WF2 -> F`) (`WF1 -> A`) + +Then `F` and `A` will access `Apple` (which is an Unsharable resource) at the same time, and there exists a sequence of events such that **a conflict is possible**. + +# Let's now build a framework in Imandra to allow us to answer these questions automatically + +We'll start with defining *agents*, *resources*, *guards* and *policies*. + +```{.imandra .input} +type agent_id = + | Node of node_id + +and node_id = + A | B | C | D | E | F + +type guard = + | Eq of sensor * int + | Or of guard * guard + +and sensor = + | Sensor + +type resource = + | Apple + | Banana + | Orange + +type sharability = + | Sharable + | Unsharable + +type policy = + (resource, sharability) Map.t +``` + +# Problems + +Next, we'll define the *problem* datatype, which will allow us to succinctly express an arbitrary conflict detection problem of the above form to Imandra for analysis. + +As above, a problem will consist of a pair of workflows, a collection of agents (each with their own identities, guards and resource accesses) and a resource access policy specifying which resources can be shared. + +```{.imandra .input} +type problem = { + work_flow_1: work_flow; + work_flow_2: work_flow; + agents: agent list; + policy: policy; +} + +and work_flow = node_id list + +and agent = { + agent_id: agent_id; + guard: guard; + accesses: resource; +} +``` + +# Operational Semantics + +Next, we're going to encode the "meaning" or "semantics" of concurrent conflicts in Imandra by defining an *interpreter* which evaluates a problem over arbitrary states of the world. Then, we'll be able to use Imandra's symbolic reasoning power to prove or disprove the existence of a conflict for a given problem by asking it to symbolically evaluate all possible behaviors of the interpreter over a given problem specification. + +## State + +The `state` datatype will encode the current state of the world. This is core datatype over which a problem execution trace will take place. + +## Interpreter + +Armed with the `state` type, we will define an interpreter which accepts a problem and a sequence of sensor readings, and yields the result. + +```{.imandra .input} +(* The current state of the world *) + +type state = { + wf_1: work_flow; + wf_2: work_flow; + sensor: int option; + agents: (node_id, agent option) Map.t; + policy: policy; + conflict: (agent_id * agent_id * resource) option; +} + +let rec eval_guard (sensor:int) (g:guard) = + match g with + | Eq (Sensor, n) -> sensor = n + | Or (g1, g2) -> + eval_guard sensor g1 || eval_guard sensor g2 + +let step (s:state) (sensor:int) = + let in_conflict r1 r2 policy = + r1 = r2 && Map.get r1 policy = Unsharable + in + match s.wf_1, s.wf_2 with + | agent_1 :: wf_1', agent_2 :: wf_2' -> + begin match Map.get agent_1 s.agents, Map.get agent_2 s.agents with + | Some actor_1, Some actor_2 -> + let g_1, g_2 = eval_guard sensor actor_1.guard, + eval_guard sensor actor_2.guard in + if g_1 && g_2 && in_conflict actor_1.accesses actor_2.accesses s.policy then ( + { s with + sensor = Some sensor; + conflict = Some (Node agent_1, Node agent_2, actor_1.accesses); + } + ) else ( + { s with + sensor = Some sensor; + wf_1 = if g_1 then wf_1' else s.wf_1; + wf_2 = if g_2 then wf_2' else s.wf_2; + } + ) + | _ -> s + end + | _ -> s + +let rec run (s:state) (sensors:int list) = + match sensors with + | [] -> (s, []) + | sensor :: sensors -> + let s' = step s sensor in + if s'.conflict = None then ( + run s' sensors + ) else ( + (s', sensors) + ) +[@@adm sensors] +``` + +# Top-level problem runner and problem-specific conflict detection + +Next, we'll add the ability to define problems, run them and detect conflicts. + +```{.imandra .input} +let rec mk_agents_map actors = + let agent_name = function Node a -> a in + match actors with + | [] -> Map.const None + | agent :: agents -> + Map.add (agent_name agent.agent_id) (Some agent) (mk_agents_map agents) + +(* Run a problem along sensor readings *) + +let run_problem (p:problem) sensors = + let init_state = { + wf_1 = p.work_flow_1; + wf_2 = p.work_flow_2; + sensor = None; + agents = mk_agents_map p.agents; + policy = p.policy; + conflict = None; + } in + run init_state sensors + +(* Is a conflict reachable from an initial state? *) + +let conflict_reachable ?(k=5) (p:problem) sensors = + let sensors = List.take k sensors in + let (s, sensors_left) = run_problem p sensors in + (s.conflict <> None && sensors_left = []) + +(* Make a policy from a list of declarations *) + +let mk_policy xs = + Map.of_list ~default:Sharable xs +``` + +# Now, let's encode some problems and check for conflicts! + +# Problem 1 + +```{.imandra .input} +let ex_1 = { + work_flow_1 = [A; B; C; A]; + work_flow_2 = [D; E; F; D]; + agents=[ + + {agent_id=Node A; + guard=Eq(Sensor, 1); + accesses=Apple}; + + {agent_id=Node B; + guard=Eq(Sensor, 2); + accesses=Banana}; + + {agent_id=Node C; + guard=Eq(Sensor, 3); + accesses=Orange}; + + {agent_id=Node D; + guard=Eq(Sensor, 1); + accesses=Orange}; + + {agent_id=Node E; + guard=Eq(Sensor, 2); + accesses=Banana}; + + {agent_id=Node F; + guard=Eq(Sensor, 3); + accesses=Apple}; + + ]; + policy=(mk_policy + [(Apple, Sharable); + (Banana, Unsharable); + (Orange, Sharable)]); +} +``` + +# Is a conflict possible? Let's ask Imandra! + +```{.imandra .input} +instance (fun sensors -> conflict_reachable ex_1 sensors) +``` + +# Problem 2 + +```{.imandra .input} +(* Example 2 *) + +let ex_2 = { + work_flow_1 = [A; B; C; A]; + work_flow_2 = [D; E; F; D]; + + agents=[ + + {agent_id=Node A; + guard=Eq(Sensor, 1); + accesses=Apple}; + + {agent_id=Node B; + guard=Eq(Sensor, 2); + accesses=Banana}; + + {agent_id=Node C; + guard=Eq(Sensor, 3); + accesses=Orange}; + + {agent_id=Node D; + guard=Eq(Sensor, 1); + accesses=Orange}; + + {agent_id=Node E; + guard=Eq(Sensor, 2); + accesses=Banana}; + + {agent_id=Node F; + guard=Eq(Sensor, 3); + accesses=Apple}; + + ]; + policy=(mk_policy + [(Apple, Unsharable); + (Banana, Sharable); + (Orange, Sharable)]); +} + +``` + +```{.imandra .input} +instance (fun sensors -> conflict_reachable ex_2 sensors) +``` + +## This means no conflicts are possible for Problem 2! + +Imandra has *proved* that this goal is unsatisfiable, i.e., that no such conflict is possible. In fact, +we can use Imandra's *verify* command to restate this as a safety property and prove it: + +```{.imandra .input} +verify (fun sensors -> not (conflict_reachable ex_2 sensors)) +``` + +## Problem 3: the use of OR in guards + +Finally, let's consider a problem in which we use the guard disjunctions (OR), which makes the search space quite a bit more complex. + +```{.imandra .input} +(* Example 3 *) + +let ex_3 = { + work_flow_1 = [A; B; C; A]; + work_flow_2 = [D; E; F; D]; + + agents=[ + + {guard=Eq(Sensor, 1); + agent_id=Node A; + accesses=Apple}; + + {guard=Eq(Sensor, 2); + agent_id=Node B; + accesses=Banana}; + + {guard=Eq(Sensor, 3); + agent_id=Node C; + accesses=Orange}; + + {guard=Or(Eq(Sensor, 1), Eq(Sensor, 2)); + agent_id=Node D; + accesses=Orange}; + + {guard=Or(Eq(Sensor, 2), Eq(Sensor, 3)); + agent_id=Node E; + accesses=Banana}; + + {guard=Or(Eq(Sensor, 3), Eq(Sensor, 1)); + agent_id=Node F; + accesses=Apple}; + + ]; + policy=(mk_policy + [(Apple, Unsharable); + (Banana, Sharable); + (Orange, Sharable)]); +} +``` + +```{.imandra .input} +verify (fun sensors -> not (conflict_reachable ex_3 sensors)) +``` + +As we can see, Imandra has proved for us that a conflict is possible for `ex_3`. It's a very nice +exercise to go through the counterexample manually and understand how this conflict occurs. We can also +use Imandra's concrete execution facilities to investigate the state for this conflict, by running the problem along the counterexample Imandra synthesized (`CX.sensors`): + +```{.imandra .input} +run_problem ex_3 CX.sensors +``` + +We can see that the conflict Imandra found, which happens with a sensor sequence of `[2;3;1]` results in +both `Node A` and `Node F` trying to access `Apple` at the same time, which is not allowed by the +resource access policy. + +You can modify these problems as you see fit and experiment with Imandra verifying or refuting conflict +safety. Happy reasoning! + +```{.imandra .input} + +``` From 4f63aa4812d4da6c61679708aae8320caf777972 Mon Sep 17 00:00:00 2001 From: Grant Passmore Date: Wed, 15 Feb 2023 16:49:36 -0600 Subject: [PATCH 4/7] chore(nb/conflict) improve prose --- notebooks-src/ConcurrentConflictDetection.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks-src/ConcurrentConflictDetection.md b/notebooks-src/ConcurrentConflictDetection.md index 7617b534..b9c9287f 100644 --- a/notebooks-src/ConcurrentConflictDetection.md +++ b/notebooks-src/ConcurrentConflictDetection.md @@ -1,6 +1,6 @@ # Imandra for automated conflict detection -In this notebook, we will build an Imandra framework for reasoning about concurrent conflict detection. Once we encode this model in Imandra, we'll be able to use Imandra to automatically solve arbitrary problems about concurrent resource detection simply by encoding them in a simple datatype and asking Imandra if a conflict is possible. +In this notebook, we will build an Imandra framework for reasoning about concurrent conflict detection. Once we encode the problem domain, we'll be able to use Imandra to automatically solve arbitrary problems in this domain of concurrent resource conflict detection simply by encoding them in a simple datatype and asking Imandra if a sequence of events leading to a conflict is possible. Let's begin with an informal description of the problem space. From a88e77d0c5f09a715c10ac1718a4dfe7b0f10bfa Mon Sep 17 00:00:00 2001 From: Grant Passmore Date: Wed, 15 Feb 2023 16:50:26 -0600 Subject: [PATCH 5/7] chore(nb/conflict): further improve prose --- notebooks-src/ConcurrentConflictDetection.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks-src/ConcurrentConflictDetection.md b/notebooks-src/ConcurrentConflictDetection.md index b9c9287f..2951eb8d 100644 --- a/notebooks-src/ConcurrentConflictDetection.md +++ b/notebooks-src/ConcurrentConflictDetection.md @@ -1,6 +1,6 @@ # Imandra for automated conflict detection -In this notebook, we will build an Imandra framework for reasoning about concurrent conflict detection. Once we encode the problem domain, we'll be able to use Imandra to automatically solve arbitrary problems in this domain of concurrent resource conflict detection simply by encoding them in a simple datatype and asking Imandra if a sequence of events leading to a conflict is possible. +In this notebook, we will build an Imandra framework for reasoning about concurrent conflict detection. Once we encode the problem domain, we'll be able to use Imandra to automatically solve arbitrary problems simply by describing them in a simple datatype and asking Imandra if a sequence of events leading to a conflict is possible. Let's begin with an informal description of the problem space. From 161ce3c9e2e5b6d0d6b14919370ed1e33de65d03 Mon Sep 17 00:00:00 2001 From: Grant Passmore Date: Wed, 15 Feb 2023 17:00:34 -0600 Subject: [PATCH 6/7] chore(nb/conflict): improve formatting --- notebooks-src/ConcurrentConflictDetection.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks-src/ConcurrentConflictDetection.md b/notebooks-src/ConcurrentConflictDetection.md index 2951eb8d..3fd19e6f 100644 --- a/notebooks-src/ConcurrentConflictDetection.md +++ b/notebooks-src/ConcurrentConflictDetection.md @@ -4,7 +4,7 @@ In this notebook, we will build an Imandra framework for reasoning about concurr Let's begin with an informal description of the problem space. -# Detecting resource conflicts over concurrent workflows +## Detecting resource conflicts over concurrent workflows Imagine there are two workflows, WF1 and WF2, that can each access Sharable and Unsharable resources. From 957524e0485e129512be84b95e7d7b252525b290 Mon Sep 17 00:00:00 2001 From: Nicola Mometto Date: Wed, 15 Feb 2023 23:26:01 +0000 Subject: [PATCH 7/7] feat: add metadata --- notebooks-src/ConcurrentConflictDetection.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/notebooks-src/ConcurrentConflictDetection.md b/notebooks-src/ConcurrentConflictDetection.md index 3fd19e6f..37a32bd0 100644 --- a/notebooks-src/ConcurrentConflictDetection.md +++ b/notebooks-src/ConcurrentConflictDetection.md @@ -1,3 +1,10 @@ +--- +title: "Concurrent Conflict Detection" +description: "Imandra for automated conflict detection" +kernel: imandra +slug: concurrent-conflict-detection +--- + # Imandra for automated conflict detection In this notebook, we will build an Imandra framework for reasoning about concurrent conflict detection. Once we encode the problem domain, we'll be able to use Imandra to automatically solve arbitrary problems simply by describing them in a simple datatype and asking Imandra if a sequence of events leading to a conflict is possible. @@ -56,21 +63,21 @@ Node F - Accesses `Apple` ### Problem 1A -Suppose that we define our resources as such: +Suppose that we define our resources as such: Resources - Apple: `Sharable` - Banana: `Unsharable` - Orange: `Sharable` -If the following sequence of events is seen: +If the following sequence of events is seen: 1. `Sensor = 1` (`WF1 -> A`) (`WF2 -> D`) 2. `Sensor = 2` (`WF1 -> B`) (`WF2 -> E`) Then `B` and `E` will access `Banana` (which is an Unsharable resource) at the same time, and there exists a sequence of events such that **a conflict is possible**. ### Problem 1B -Suppose that we now define our resources as such: +Suppose that we now define our resources as such: Resources - Apple: `Unsharable` @@ -83,7 +90,7 @@ Then there is **no such sequence of events such that a conflict is possible**. Suppose we keep the resource definition as in 1B but now change the definition of the Nodes to be: Node D -- Starts when `Sensor == 1` OR `Sensor == 2` +- Starts when `Sensor == 1` OR `Sensor == 2` Node E - Starts when `Sensor == 2` OR `Sensor == 3` @@ -92,7 +99,7 @@ Node F - Starts when `Sensor == 3` OR `Sensor == 1` - Accesses `Apple` -If the following sequence of events is seen: +If the following sequence of events is seen: 1. `Sensor = 2` (`WF2 -> D`) 2. `Sensor = 3` (`WF2 -> E`) 3. `Sensor = 1` (`WF2 -> F`) (`WF1 -> A`)