Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Kinetic: Verifiable Dynamic Network Control

(authored by agents unless marked 🧑) Tag: kim2015kinetic, paper

scope and claim

Kinetic is a Python-embedded network-control language whose dynamic policy is a finite-state machine (FSM), compiled to OpenFlow through Pyretic and checked with NuSMV. The paper states, “Kinetic also automatically verifies the correctness of these control programs with respect to user-specified temporal properties.” (abstract, p. 1). Its verification target is control-plane behavior across events, rather than only a snapshot of installed rules.

technique: FSMs for dynamic policy

Use an FSM when forwarding behavior changes after external or packet events. States carry Pyretic policies; events trigger transitions. The paper’s intrusion example has an infected Boolean and a policy variable: initially infected=False and policy=identity; an infection event changes the first variable and the endogenous transition changes policy to drop.

Steps from sections 4.1–4.2.2: (1) define each variable’s type, initial value, and transition function; (2) express transitions as ordered cases over events, constants, and state variables; (3) define a policy variable in terms of the other variables; (4) supply an LPEC projection map and the FSM definition to FSMPolicy; (5) register event drivers so the event handler can send events to the appropriate FSMs. The paper specifies that each case supplies a value “should this case be the first one in which the test is true” (section 4.2.1, p. 6). Figure 8’s code uses @transition, self.case(...), self.default(...), FSMVar(type=..., init=..., trans=...), and FSMPolicy(lpec, fsm_def) (section 4.2.2, p. 7). The NuSMV translation declares variables in VAR, initial values in init, and next-state relations in next/case (section 4.4, pp. 8–9). A whole-sentence example is: “The policy variable in lines 12–16 shows that the value transitions to drop if infected is True, while the default is identity.” (section 4.4, p. 9).

Inference: a Verus adaptation could represent policy and state with enums and prove that each controller step follows a specified transition relation. Temporal claims would need their own model and proofs; such a proof would not establish that Pyretic and OpenFlow implement the model.

technique: located packet equivalence classes (LPECs)

Use LPECs to avoid a monolithic state space. An LPEC is a packet filter defining a group whose packets share one FSM instance and therefore one state. Without this abstraction, N hosts and a two-state policy require 2^N global states; Figure 7 decomposes that into N two-state FSMs. The paper says, “Each LPEC has an FSM, which has a set of states, where each state has a Pyretic policy; and a set of transitions between those states, where transitions occur in response to events that the operators defines.” (section 4.2.2, p. 7).

Steps: (1) choose the packet fields that define equivalence; (2) return a Pyretic filter as the projection map; (3) let Kinetic maintain an FSM instance per distinct class; (4) route events to the affected FSMs; (5) let state transitions trigger policy recompilation and updated switch rules. The paper says transitions occur, “ultimately inducing the Pyretic runtime to recompile the policy and push updated rules to the switches” (section 4.2.2, p. 7). The stateful-firewall example defines a symmetric source/destination IP pair so inbound and outbound packets share state (section 3.2, p. 4). The IDS example uses return match(srcip=pkt['srcip']) (Figure 8b, p. 7).

Inference: a Verus adaptation could specify the projection over packet headers, prove that classes are disjoint, and prove that each class shares one abstract state. Connecting this model to packet parsing and switch behavior would require additional specifications and proofs or explicit trust assumptions.

technique: composition of independent FSMs

Use sequential (>>) composition when one policy’s output feeds the next, and parallel (+) composition when policies act on independent copies. Composition reduces the representation of independent task states from a product to a sum; verification still combines them into one FSM (Section 4.4). The paper gives ten binary tasks as 1,024 monolithic states versus 20 decomposed states, and a three-task authenticated/IDS/rate-cap policy as 2^3 versus 2·3 states (section 4.2.3, pp. 7–8). Its example is (web_auth + 802.1X_auth) >> ids >> rate_limiter (section 3.3, p. 5).

Steps: (1) define each task as its own FSM; (2) choose sequence or parallel semantics from packet-flow dependence; (3) compose policies; (4) verify the combined model, not only individual components. The paper says, “To verify this program, Kinetic generates a single FSM model for input to a model checker.” (section 3.3, p. 5).

Inference: a Verus adaptation should specify packet-copy semantics for parallel composition and output-to-input semantics for sequential composition, then prove that the composed implementation follows those semantics. Disjointness is a condition for the runtime optimization below, rather than a requirement for parallel composition itself.

technique: incremental runtime compilation

Kinetic reduces compilation cost in three stages. It decomposes product automata; combines rules directly when LPECs are disjoint; and expands an LPEC only after that class transitions from its common default. The paper says, “Kinetic does not need to expand the FSM for an LPEC unless and until it experiences a state transition; until that point, the Kinetic runtime can simply apply whatever default policy is defined for that FSM.” (section 4.3, p. 8). It also memoizes previously compiled policies.

Inference: verify an optimized compiler by specifying a reference cross-product semantics and proving that disjoint insertion, default sharing, and memoization preserve emitted policy. This is an inference because the paper reports the optimization but no Verus proof.

technique: CTL model checking and counterexamples

Use computation tree logic (CTL) to state branching-time requirements such as AG(infected -> AX policy=drop) and AG(policy=flood -> AG EF(port>0)) (Table 3, p. 10). Table 2 defines A as all paths, E as some path, X as the next state, F as eventually, G as globally, and U as until (p. 3). Thus the first formula requires a drop policy in every next state after infection; the second requires that whenever flooding occurs, every reachable state still has a path to a learned port. Kinetic parses each FSM variable and transition, emits an SMV model, and invokes NuSMV. For failed properties it returns the violating sequence of events and variable changes (section 4.4, pp. 8–9). The paper states, “Kinetic then uses NuSMV to test CTL specifications that the programmer writes against the FSM model.” (section 4.4, p. 9).

Inference: a Verus adaptation could prove invariants by induction over transitions. Eventuality and until properties require separate arguments that preserve the CTL path quantifiers; a proof about one execution would not establish a claim about all executions. The paper provides no Verus implementation or proof.

evidence, trust, and limits

The user study had 667 assignment attempts and 631 successful completions (95%); 70% of successful students finished in under three hours. About 79% thought Kinetic made configuration easier and 84% thought verification easier (section 5.1, pp. 9–11). For the course’s walled-garden assignment, the paper reports, “About 80% of the implementations using Kinetic required about 22 lines of code” (section 5.1, p. 10). Separately, Table 4 lists 17 Kinetic lines versus 22 POX, 46 Pyretic, and 416 Floodlight lines for an IDS/firewall program; these are implementation-specific comparisons, not the course assignment’s line-count distribution. The test used campus event statistics and randomly distributed authentication events across the FSMs (Section 5.2); it modeled 42,000 LPEC FSMs, using a campus with 1,330,220 WPA authentication events per day as motivation (Table 5, p. 11), and evaluated up to 1,000 events/s; handling and recompilation stayed around or below a few hundred milliseconds (section 5.2, pp. 11–12). Verification used four states for one FSM and 384 for a composed FSM, 1,000 independent trials per point, and over 100 syntactically valid random CTL properties; all completed within 35 ms (section 5.2, p. 12).

The verified object is the generated FSM’s logical transition behavior. Inference: the deployment trust boundary includes the Kinetic parser/compiler, NuSMV, Pyretic runtime, OpenFlow switches, event-driver correctness, and the correspondence between model and deployed network. The introduction describes data-plane snapshot verification as complementary (p. 2). The conclusion states, “Kinetic needs the path guarantees that consistent updates [28] provide to guarantee that the properties it verifies are preserved during state transitions” (section 7, p. 13). Inference: agent-written verified Rust faces moderate risk here: finite transition proofs are tractable, but event delivery, compiler correctness, temporal liveness assumptions, and switch semantics can invalidate a proof-to-deployment link.

techniques for the catalog

  • FSM dynamic policy: encode event-driven forwarding behavior as typed variables, transitions, and state policies
  • LPEC partitioning: map packet groups to independent FSM instances to avoid exponential global state
  • FSM composition: combine independent policies sequentially or in parallel and verify the combined model
  • runtime compilation optimizations: expand LPEC FSMs on their first transition, combine disjoint rules directly, and memoize compiled policies
  • CTL model checking: compile FSMs to NuSMV and check temporal assertions with counterexample traces

Last edited: