Thomas Mailund and Michael Westergaard Department of Computer Science

Slides:



Advertisements
Similar presentations
Heuristic Search techniques
Advertisements

Garbage collection David Walker CS 320. Where are we? Last time: A survey of common garbage collection techniques –Manual memory management –Reference.
Partial Order Reduction: Main Idea
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.
Introduction to Computer Science 2 Lecture 7: Extended binary trees
CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking.
Building Verifiable Software Prototypes Using Coloured Petri NetsQualifying Exam 1/39 June 17, 2005 Building Verifiable Software Prototypes Using Coloured.
Best-First Search: Agendas
Kurt Jensen Lars M. Kristensen 1 Coloured Petri Nets Department of Computer Science Coloured Petri Nets Modelling and Validation of Concurrent Systems.
Graphs & Graph Algorithms 2
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
Merged processes – a new condensed representation of Petri net behaviour V.Khomenko 1, A.Kondratyev 2, M.Koutny 1 and W.Vogler 3 1 University of Newcastle.
Transactions and Reliability. File system components Disk management Naming Reliability  What are the reliability issues in file systems? Security.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
1 ECE-517: Reinforcement Learning in Artificial Intelligence Lecture 6: Optimality Criterion in MDPs Dr. Itamar Arel College of Engineering Department.
Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 1/18 June 26, 2004 Towards a High-Level Petri Net Type Definition.
Greedy algorithms David Kauchak cs161 Summer 2009.
Graphs. Made up of vertices and arcs Digraph (directed graph) –All arcs have arrows that give direction –You can only traverse the graph in the direction.
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
Problem Reduction So far we have considered search strategies for OR graph. In OR graph, several arcs indicate a variety of ways in which the original.
Chapter 11 Resource Allocation by Mikhail Nesterenko “Distributed Algorithms” by Nancy A. Lynch.
/ PSWLAB S PIN Search Optimization from “THE SPIN MODEL CHECKER” by G. Holzmann Presented by Hong,Shin 23 th Nov SPIN Search.
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
An Algorithm for Enumerating SCCs in Web Graph Jie Han, Yong Yu, Guowei Liu, and Guirong Xue Speaker : Seo, Jong Hwa.
The material in this lecture should be review. If you have not seen it before, you should be able to learn it quickly – and on your own. So we are going.
Lecture 3: Uninformed Search
Adversarial Search and Game-Playing
Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have.
Transactions and Reliability
Introduction to complexity
Approximating the MST Weight in Sublinear Time
Lecture 3 of Computer Science II
The Greedy Method and Text Compression
“Smart” State Spaces © Kurt Jensen Department of Computer Science University of Aarhus, Denmark "Smart" State.
Artificial Intelligence (CS 370D)
Map interface Empty() - return true if the map is empty; else return false Size() - return the number of elements in the map Find(key) - if there is an.
Games with Chance Other Search Algorithms
Coloured Petri Nets Modelling and Validation of Concurrent Systems
NP-Completeness Yin Tat Lee
Skip Lists.
Problem Reduction -AND-OR Graph -AO* Search CSE 402 K3R23/K3R20.
ESE535: Electronic Design Automation
Haim Kaplan and Uri Zwick
Lectures on Graph Algorithms: searching, testing and sorting
Depth-First Searches Introduction to AI.
Data Structures and Analysis (COMP 410)
XML indexing – A(k) indices
Lecture 16: Register Allocation
ESE535: Electronic Design Automation
An explicit state model checker
CS 188: Artificial Intelligence Fall 2008
CO Games Development 1 Week 8 Depth-first search, Combinatorial Explosion, Heuristics, Hill-Climbing Gareth Bellaby.
NP-Completeness Yin Tat Lee
Backtracking and Branch-and-Bound
More advanced aspects of search
Lecture 17: Register Allocation via Graph Colouring
Artificial Intelligence CIS 342
A Block Based MAP Segmentation for Image Compression
CS 416 Artificial Intelligence
ICS 353: Design and Analysis of Algorithms
COMPILERS Liveness Analysis
CSE P 501 – Compilers SSA Hal Perkins Autumn /31/2019
Reinforcement Learning (2)
Normal Form (Matrix) Games
(via graph coloring and spilling)
Lecture-Hashing.
Basic Search Methods How to solve the control problem in production-rule systems? Basic techniques to find paths through state- nets. For the moment: -
Depth-First Searches.
Reinforcement Learning (2)
Presentation transcript:

Obtaining Memory-Efficient Reachability Graph Representations Using the Sweep-Line Method Thomas Mailund and Michael Westergaard Department of Computer Science University of Aarhus Denmark March 30, 2004

Setting (1) We want to explicitely store the entire reachability graph, but conserve space by storing each state/node using as few bits as possible The most naїve representation of a state would store a pair (n, m) as two independent numbers, potentially wasting space (if n,m  {0, ... ,4}, we would use 2 · ceil(log(5)) = 3 + 3 = 6 bits per state, or even 32 + 32 = 64 bits or more, if we store them as integers) A better approach is to enumerate the syntactically possible states, and use only enough bits to distinguish between them (ceil(log(5 · 5)) = 5 bits per state) March 30, 2004

Setting (2) The optimal solution is to enumerate the reachable states only, and store each state using the number of bits required to distinguish them (in the example, if only 13 of the states were actually reachable, we could store each state using ceil(log(13)) = 4 bits only) Unfortunately we do not know the number of reachable states until after we have constructed the entire reachability graph. We try to address this problem here March 30, 2004

Outline Condensed Representation The Sweep-Line Method On-the-fly Construction of the Condensed Representation Experimental Results March 30, 2004

Example (1) 2 runners in a race with 2 laps Either t1) runner 1 finishes a lap before runner 2, t2) runner 2 finishes a lap before runner 1, or t3) both runners finish a lap at the same time A runner can be at most 1 lap ahead of the other runner In the beginning neither of the runners have finished any laps The state of the system is a pair (n, m), where n is the number of laps completed by runner 1 and m is the number of laps completed by runner 2 March 30, 2004

Example (2) Only some (7) of the syntactically possible states (9) are reachable At least ceil(log(9))=4 bits are used to store each state, although ceil(log(7))=3 bits would suffice In realistic examples, the number of syntactically possible states is much larger than the number of reachable states, so distinguishing only between reachable states yields a good reduction Alas, we first know the number of reachable states, when we have constructed the reachability graph At least 4 bits needed (to distinguish syntactical possible states); most would use log 3 + log 3 = 6 or more. We do not know that log 7 bits suffices till the construction is done. March 30, 2004

Condensed Representation We assume that we can enumerate the transitions Assign to each reachable state a number, 0…R-1 Transition 1 2 3 5 4 6 Destination state Number of transitions State number komponont: Kender fx max antal transitioner, eller lav “bottom”-transition, som afslutter listen (log T bits) komponent: Kender antallet, og derfor hvor meget hver trans fylder (ikke paakraevet hvis transitionerne kan beregnes) komponent: Kender max antal tilstande (subst. Nummer paa sidste tilstand herfra) (log R bits) I alt R(w + log T) + A(log T + log R) bits March 30, 2004

Traversal of Condensed Representation 1 2 3 5 4 6 We assume the existence of a (partial) mapping next that for a state and a transition gives the next state (e.g. next((1,0), t3)=(2,1)) We have not lost any information with this reduction, so analysis is still possible; for example a depth-first traversal would look like: DFS(0, sI) proc DFS(i, m) if (visited(i)) return analyse(m) for each (t, i’) in E[i] DFS(i’, next(m, t)) end for end proc Hvis naeste tilstand eksisterer – next eksisterer for deterministiske systemer Ex Deterministic Labelled Transition Systems, Petri Nets, … March 30, 2004

The Sweep-Line Method Not yet discovered state sweep-line We assume a progress measure, ψ, that assigns to each state a progress value, such that s->s’ => ψ(s)≤ψ(s’) Here, we take ψ(n,m)=n All states to be processed are in front of the sweep-line All new states are added in front of the sweep-line We do not need the states behind the sweep-line; they can safely be removed from memory Discovered but unprocessed state Processed state PM: # laps completed by runner 1 To use in practise, we need a syntactical way to capture this notion of progress… progress 1 2 March 30, 2004

On-the-fly Construction of the Condensod Representation New header: Number of bits used to represent the successor states On-the-fly Construction of the Condensod Representation sweep-line 2 1 3 4 5 6 State number Number of transitions Destination state Transition Now 3 bits are required Add number of bits used to store a destination node, as R is unknown Here we store transitions – they are not needed if they can be calculated progress March 30, 2004

Experimental Results A prototypical implementation of the described method has been made in Design/CPN, a tool for editing, simulating and analysing Coloured Petri Nets The implementation does not take into account the different sizes of the numbers, and encodes everything in a machine word March 30, 2004

Experimental Results (Runner Example) PM: # laps completed by runner 1 Uses approx. 20% memory One would probably use another reduction mechanism, as the system is symmetrical in runners and # laps. March 30, 2004

Experimental Results (Stop and Wait Protocol) Fairly realistic protocol PM: # succesfully received packets 40-50% slower, but only 4-5% size March 30, 2004

Experimental Results (Dining Philosophers) PM: # eating philosophers Worst case scenario – lots of regress edges Small penalty in size; rather large penalty in time (actually explores twice as many states as the basic algorithm); compares fine with a penalty of approx. 50% pr explored state March 30, 2004

Conclusion We have seen an efficient representation of reachability graphs, and how this representation can be traversed for analysis We have seen how the efficient representation can be calculated efficiently using the sweep-line method We have seen how the method performs on some examples – basically, the method performs well when the sweep-line method performs well, i.e. for systems with a clear notion of progress March 30, 2004

Future Work Implementation of LTL/CTL checker Use on more realistic examples Use the described method with methods reducing the reachability graph itself, e.g. symmetry reduction Caching idx mapping March 30, 2004

Non-monotone Progress Measures If s->s’ => ψ(s)≤ψ(s’), we say that ψ is monotone If the progress measure we use is not monotone, the algorithm still works, but the generated reachability graph may be an unfolding of the real reachability graph The unfolded reachability graph and the real reachability graph are bisimilar (so CTL* is preserved) This actually happens in the Dining Philosophers example March 30, 2004

Non-monotone Progress Measures (2) To the runner example, add a transition: t4) When both runners have completed the race, start over March 30, 2004