Program Synthesis for Network Updates Pavol Černý CU Boulder Dagstuhl, February 2015.

Slides:



Advertisements
Similar presentations
Modeling issues Book: chapters 4.12, 5.4, 8.4, 10.1.
Advertisements

Heuristic Search techniques
Data-Flow Analysis II CS 671 March 13, CS 671 – Spring Data-Flow Analysis Gather conservative, approximate information about what a program.
Software-defined networking: Change is hard Ratul Mahajan with Chi-Yao Hong, Rohan Gandhi, Xin Jin, Harry Liu, Vijay Gill, Srikanth Kandula, Mohan Nanduri,
Dynamic Scheduling of Network Updates Xin Jin Hongqiang Harry Liu, Rohan Gandhi, Srikanth Kandula, Ratul Mahajan, Ming Zhang, Jennifer Rexford, Roger Wattenhofer.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Evaluating “find a path” reachability queries P. Bouros 1, T. Dalamagas 2, S.Skiadopoulos 3, T. Sellis 1,2 1 National Technical University of Athens 2.
Dynamic Scheduling of Network Updates Based on the slides by Xin Jin Hongqiang Harry Liu, Rohan Gandhi, Srikanth Kandula, Ratul Mahajan, Ming Zhang, Jennifer.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking.
Incremental Consistent Updates Naga Praveen Katta Jennifer Rexford, David Walker Princeton University.
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 excerpts Graphs (breadth-first-search)
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
Ashish Kundu CS590F Purdue 02/12/07 Language-Based Information Flow Security Andrei Sabelfield, Andrew C. Myers Presentation: Ashish Kundu
Termination Detection Part 1. Goal Study the development of a protocol for termination detection with the help of invariants.
CS412/413 Introduction to Compilers Radu Rugina Lecture 16: Efficient Translation to Low IR 25 Feb 02.
CS 536 Spring Global Optimizations Lecture 23.
Enhancing The Fault-Tolerance of Nonmasking Programs Sandeep S. Kulkarni and Ali Ebnenasir Software Engineering and Network Systems Laboratory Computer.
4/25/08Prof. Hilfinger CS164 Lecture 371 Global Optimization Lecture 37 (From notes by R. Bodik & G. Necula)
Witness and Counterexample Li Tan Oct. 15, 2002.
Review of the automata-theoretic approach to model-checking.
Prof. Fateman CS 164 Lecture 221 Global Optimization Lecture 22.
Control Structures Control structures control the flow of program execution. 3 types of control structures: sequence, selection.
1 Completeness and Complexity of Bounded Model Checking.
Chapter 5 Outline Formal definition of CSP CSP Examples
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
Backtracking.
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
Prof. Bodik CS 164 Lecture 16, Fall Global Optimization Lecture 16.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Brute Force Search Depth-first or Breadth-first search
Fundamentals of Python: From First Programs Through Data Structures
Time-Constrained Flooding A.Mehta and E. Wagner. Time-Constrained Flooding: Problem Definition ●Devise an algorithm that provides a subgraph containing.
Fundamentals of Python: First Programs
1 Thread Synchronization: Too Much Milk. 2 Implementing Critical Sections in Software Hard The following example will demonstrate the difficulty of providing.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Operation, Algorithm, and Data Structure Specification, and Design Finalization.
CHAPTER 5: CONTROL STRUCTURES II INSTRUCTOR: MOHAMMAD MOJADDAM.
VeriFlow: Verifying Network-Wide Invariants in Real Time
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 Graphs.
Automatic Verification of Finite-State Concurrent Systems Using Temporal Logic Specifications 1.
2000 년 11 월 20 일 전북대학교 분산처리실험실 TCP Flow Control (nagle’s algorithm) 오 남 호 분산 처리 실험실
Chapter 5: Control Structures II (Repetition). Objectives In this chapter, you will: – Learn about repetition (looping) control structures – Learn how.
Introduction to Problem Solving. Steps in Programming A Very Simplified Picture –Problem Definition & Analysis – High Level Strategy for a solution –Arriving.
1 Section 2.1 Algorithms. 2 Algorithm A finite set of precise instructions for performing a computation or for solving a problem.
Lecture 3: Uninformed Search
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Chapter 13: Graphs Data Abstraction & Problem Solving with C++
© 2006 Pearson Addison-Wesley. All rights reserved 14 A-1 Chapter 14 Graphs.
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
An Improved DFA for Fast Regular Expression Matching Author : Domenico Ficara 、 Stefano Giordano 、 Gregorio Procissi Fabio Vitucci 、 Gianni Antichi 、 Andrea.
February 11, 2016Introduction to Artificial Intelligence Lecture 6: Search in State Spaces II 1 State-Space Graphs There are various methods for searching.
NETWORK FLOWS Shruti Aggrawal Preeti Palkar. Requirements 1.Implement the Ford-Fulkerson algorithm for computing network flow in bipartite graphs. 2.For.
1 CSC 384 Lecture Slides (c) , C. Boutilier and P. Poupart CSC384: Lecture 16  Last time Searching a Graphplan for a plan, and relaxed plan heuristics.
Iterative Improvement for Domain-Specific Problems Lecturer: Jing Liu Homepage:
Data Structures and Algorithm Analysis Graph Algorithms Lecturer: Jing Liu Homepage:
Parallel and Distributed Simulation Deadlock Detection & Recovery.
Authors: Mark Reitblatt, Nate Foster, Jennifer Rexford, Cole Schlesinger, David Walker Presenter: Byungkwon Choi Abstractions for Network Update INA.
LINKED LISTS.
ETH Zurich – Distributed Computing – Klaus-Tycho Förster, Ratul Mahajan, and Roger Wattenhofer Consistent Updates in Software Defined.
Network Layer COMPUTER NETWORKS Networking Standards (Network LAYER)
SDN Network Updates Minimum updates within a single switch
Martin Casado, Nate Foster, and Arjun Guha CACM, October 2014
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Program Synthesis for Networks Pavol Černý FMCAD September 2016.
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Csc 2720 Instructor: Zhuojun Duan
Red-Black Trees Motivations
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Lecture 10, Computer Networks (198:552)
Chapter 14 Graphs © 2011 Pearson Addison-Wesley. All rights reserved.
Minimax strategies, alpha beta pruning
Presentation transcript:

Program Synthesis for Network Updates Pavol Černý CU Boulder Dagstuhl, February 2015

Hossein HojjatJedidiah McClurg Nate Foster

Program synthesis

Network updates

Network Update T1 A1 A2 T2 C1 T3 A3 A4 T4 C2 H1 H2 H3 H4 Spec: consistency – either red or blue

Technique: Two-Phase Updates Space: in general, two-phase updates require double the amount of memory on switches Time: updating a TCAM can take on the order of 10s of seconds for several hundred rules Semantics: in many applications, full consistency is not needed

Order Updates T1 A1 A2 T2 C1 T3 A3 A4 T4 C2 H1H1 H2H2 H3H3 H4H4 Approach: update switches in a specified order that eventually reaches the target configuration Problem: can create behaviors that were not possible in either configuration, which easily leads to violations of important invariants Example: updating A1 first, then C2 breaks H1-H3 connectivity!

Order Update Example T1 A1 A2 T2 C1 T3 A3 A4 T4 C2 No order update preserves full consistency! H1 H2 H3 H4 If we want only H1-H3 connectivity: Order A2-A4-T1-C1 works

Order Update Example T1 A1 A2 T2 C1 T3 A3 A4 T4 C2 H1 H2 H3 H4 Property: at all times, maintain H1-H3 connectivity and either traverse A2 or A3 A2-A4-C1 (not good) A2-A4-T1-C1 ?

Waits T1 A1 A2 T2 C1 T3 A3 A4 T4 C2 H1 H2 H3 H4 Approach: to avoid violating invariants, pause between each switch update, and wait until in-flight packets have exited the network Performance: because transmission delay of a switch is in μs, but TCAM updates take 10s of seconds, effect of waits is negligible

Outline (synthesis for network updates) 1.Synthesis for network updates 2. Main ideas Counterexample-driven search Incremental model checking

Synthesis of Updates Input: initial network configuration final network configuration set of path properties (in LTL) Output: sequence of switch updates such that the path properties hold for every packet that traverses the network while updates are performed

LTL and Packet Path Properties

Outline (synthesis for network updates) 1.Synthesis for network updates 2. Main ideas Counterexample-driven search Incremental model checking

Order Update Synthesis: Search φ LTL property topology + configurations

Algorithm  High-level structure: Depth-first search with Incremental model checking (for LTL) featuring Counterexample-based pruning Early Search Termination Wait removal

Counterexamples Use of counterexamples. If a configuration is found to be wrong, we get a counterexample. Counterexample: (sequence of pairs (node;bool); bool indicates whether node has been updated) (A1,true) (C2,false) Use the counterexample to avoid model checking calls. T1 A1 A2 T2 C1 T3 A3 A4 T4 C2 H1H1 H2H2 H3H3 H4H4

No forwarding loops Critical Observation: Correct network configurations do not produce forwarding loops. Therefore: We obtain loop-free Kripke structures. The observation greatly simplifies (incremental) model checking.

Model checking for LTL on loop-free structures One sentence summary: The idea is the same as in LTL-to-Büchi construction, but on loop-free structures it is possible to check all constraints locally (no need for the Büchi condition).

Model checking for LTL on loop-free structures Labeling sink nodes

Model checking for LTL on loop-free structures Labeling internal nodes

Incremental model checking LTL a a b F a b a a b F b b Update Example: We are updating the state K. The label at state K has changed. The label at its parent has not changed. We can stop propagating the update. K K

Algorithm High-level structure: depth-first search with counterexamples  Two restrictions i.Every node updated at most once. Simple sequence of updates. ii.Wait between every two updates. Careful sequence of updates. a)Enables checking configurations in isolation. b)Requires loop-freedom. (At each step, we check that the node we updated is not a part of a loop.)  Wait removal heuristic Two switches A and B; update sequence A followed by B. If in the initial configuration, packets processed by A cannot reach B, then no wait needed

Algorithm Procedure DFSforOrder(NetPol, cs) Input: current network policy NetPol; last updated switch cs Output: ok if a correct update sequence exists; the sequence L 1: if NetPol = NetPolF then return (true, [NetPol]) 2: if (NetPol models V) or (NetPol models W) return (false,[]) 3: V  (V or NetPol) 4: if (cs != bot) then 5: (ok,cex)  hasNewLoops(NetPol,cs) 6: if (not ok) { W  W or analyzeCex(cex); return (false,[]) } 7: (ok, cex)  ModelCheck(NetPol,F) 8: if (not ok) { W  W or analyzeCex(cex); return (false,[]) } 9: for all (NetPolN,cs) in NextPolicies(NetPol) do 10: (ok,L)  DFSforOrder(NetPolN,cs) 11: if ok then return (true,NetPol::wait::L) Procedure OrderUpdates(NetPolI, NetPolG, F) Input: init policy NetPolI; target policy NetPolG; LTL spec F Output: simple and careful sequence of updates, if it exists 1: if hasLoops(NetPolI) or hasLoops(NetPolG) then return “No” 2: W  false //wrong configurations 3: V  false //visited configurations 4: (ok,L)  DFSforOrder(NetPolI,bot) 5: if ok then return L else return “No”

Algorithm Procedure DFSforOrder(NetPol, cs) Input: current network policy NetPol; last updated switch cs Output: ok if a correct update sequence exists; the sequence L 1: if NetPol = NetPolF then return (true, [NetPol]) 2: if (NetPol models V) or (NetPol models W) return (false,[]) 3: V  (V or NetPol) 4: if (cs != bot) then 5: (ok,cex)  hasNewLoops(NetPol,cs) 6: if (not ok) { W  W or analyzeCex(cex); return (false,[]) } 7: (ok, cex)  ModelCheck(NetPol,cs,F) 8: if (not ok) { W  W or analyzeCex(cex); return (false,[]) } 9: for all (NetPolN,cs) in NextPolicies(NetPol) do 10: (ok,L)  DFSforOrder(NetPolN,cs) 11: if ok then return (true,NetPol::wait::L)

Related Work Consistent updates Network verification Header Space Analysis NetPlumber … Network update synthesis (via ordering updates) zUpdate Dionysos (SIGCOMM 2014, Jin, Liu, Gandhi, Kandula, Mahajan, Zhang, Rexford, Wattenhofer )  computes ordering updates based on a dependency tree  would be cool: dependency trees for a general class of properties Godfrey et al. NSDI 2015 Schmid et al. HotNets 2014

References  Andrew Noyes, Todd Warszawski, Pavol Cerny, Nate Foster Toward Synthesis of Network Updates, SYNT 2013  Jedidiah McClurg, Hossein Hojjat, Pavol Cerny, Nate Foster Efficient Synthesis of Network Updates, PLDI 2015

Summary Main ideas: I. Easier to specify than to implement  good problem for program synthesis II. Incremental model checking (for LTL) Future work:  Fast updates (eliminating wait commands)  Failure recovery, robustness  Bandwidth constraints  Heuristic: re-using model checking labeling in search

Program Synthesis for Network Updates Pavol Černý CU Boulder Dagstuhl, February 2015