Bit-State Space Exploration It’s a variation on reachability analysis The reachability analysis: –Keeps track of the already explored states –Performs.

Slides:



Advertisements
Similar presentations
The Dictionary ADT: Skip List Implementation
Advertisements

David Luebke 1 6/7/2014 ITCS 6114 Skip Lists Hashing.
Chapter6 LISTS AND STRINGS. Outline 1. List Specifications 2. List Implementations (a) Class Templates (b) Contiguous (c) Simply Linked (d) Simply Linked.
Preliminaries Advantages –Hash tables can insert(), remove(), and find() with complexity close to O(1). –Relatively easy to program Disadvantages –There.
Memory.
Hash Tables Introduction to Algorithms Hash Tables CSE 680 Prof. Roger Crawfis.
CSE 1302 Lecture 23 Hashing and Hash Tables Richard Gesick.
Garbage collection David Walker CS 320. Where are we? Last time: A survey of common garbage collection techniques –Manual memory management –Reference.
CS252: Systems Programming Ninghui Li Program Interview Questions.
COL 106 Shweta Agrawal and Amit Kumar
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
Searching: Self Organizing Structures and Hashing
Data Structures Using C++ 2E
Hashing Part Two Better Collision Resolution Small parts of this material stolen from "File Organization and Access" by Austing and Cassel.
CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking.
Reachability analysis A reachability analysis shows the product space of the two processes and the signal queues of their input ports. Say we have an SDL.
Artificial Intelligence (CS 461D)
Hashing Chapters What is Hashing? A technique that determines an index or location for storage of an item in a data structure The hash function.
Backtracking COP Backtracking  Backtracking is a technique used to solve problems with a large search space, by systematically trying and eliminating.
CPSC 335 Computer Science University of Calgary Canada.
Binary Heaps CSE 373 Data Structures Lecture 11. 2/5/03Binary Heaps - Lecture 112 Readings Reading ›Sections
File Systems Implementation
File System Structure §File structure l Logical storage unit l Collection of related information §File system resides on secondary storage (disks). §File.
Blind Search-Part 2 Ref: Chapter 2. Search Trees The search for a solution can be described by a tree - each node represents one state. The path from.
Introduction to Hashing CS 311 Winter, Dictionary Structure A dictionary structure has the form: (Key, Data) Dictionary structures are organized.
Lecture 10: Search Structures and Hashing
Hashing General idea: Get a large array
E.G.M. PetrakisHashing1 Hashing on the Disk  Keys are stored in “disk pages” (“buckets”)  several records fit within one page  Retrieval:  find address.
Data Structures Using C++ 2E Chapter 9 Searching and Hashing Algorithms.
EECC722 - Shaaban #1 Lec # 9 Fall Conventional & Block-based Trace Caches In high performance superscalar processors the instruction fetch.
Spring 2015 Lecture 6: Hash Tables
8.4 paging Paging is a memory-management scheme that permits the physical address space of a process to be non-contiguous. The basic method for implementation.
1 Symbol Tables The symbol table contains information about –variables –functions –class names –type names –temporary variables –etc.
David Luebke 1 10/25/2015 CS 332: Algorithms Skip Lists Hash Tables.
Comp 335 File Structures Hashing.
Paging Example What is the data corresponding to the logical address below:
Hashing Sections 10.2 – 10.3 CS 302 Dr. George Bebis.
1 5. Abstract Data Structures & Algorithms 5.2 Static Data Structures.
1 HASHING Course teacher: Moona Kanwal. 2 Hashing Mathematical concept –To define any number as set of numbers in given interval –To cut down part of.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 11: File System Implementation.
March 23 & 28, Csci 2111: Data and File Structures Week 10, Lectures 1 & 2 Hashing.
March 23 & 28, Hashing. 2 What is Hashing? A Hash function is a function h(K) which transforms a key K into an address. Hashing is like indexing.
Lecture 12COMPSCI.220.FS.T Symbol Table and Hashing A ( symbol) table is a set of table entries, ( K,V) Each entry contains: –a unique key, K,
COSC 2007 Data Structures II Chapter 13 Advanced Implementation of Tables IV.
Data Structure II So Pak Yeung Outline Review  Array  Sorted Array  Linked List Binary Search Tree Heap Hash Table.
Hashtables. An Abstract data type that supports the following operations: –Insert –Find –Remove Search trees can be used for the same operations but require.
Fall 2000M.B. Ibáñez Lecture 24 File-System III File System Implementation.
Resolution The resolution of an image is determined by the number of individually addressable points that make up the image, whether it is the number.
1 CSCD 326 Data Structures I Hashing. 2 Hashing Background Goal: provide a constant time complexity method of searching for stored data The best traditional.
/ PSWLAB S PIN Search Optimization from “THE SPIN MODEL CHECKER” by G. Holzmann Presented by Hong,Shin 23 th Nov SPIN Search.
1 Directed Graphs Chapter 8. 2 Objectives You will be able to: Say what a directed graph is. Describe two ways to represent a directed graph: Adjacency.
1 Chapter 9 Searching And Table. 2 OBJECTIVE Introduces: Basic searching concept Type of searching Hash function Collision problems.
Fahiem Bacchus © 2005 University of Toronto 1 CSC384: Intro to Artificial Intelligence Search II ● Announcements.
Lecture Topics: 12/1 File System Implementation –Space allocation –Free Space –Directory implementation –Caching Disk Scheduling File System/Disk Interaction.
CIS 842: Specification and Verification of Reactive Systems Lecture INTRO-Depth-Bounded: Depth-Bounded Depth-first Search Copyright 2004, Matt Dwyer, John.
Using SPIN. INTRODUCTION To extend the protocol simulator from Chapter 12 with an validator generator, all we have to do is to activate two command line.
File System Implementation
COMP 53 – Week Eleven Hashtables.
Efficient implementations of Alignment-based algorithms
Hashing CSE 2011 Winter July 2018.
Lecture No.43 Data Structures Dr. Sohail Aslam.
CS 332: Algorithms Hash Tables David Luebke /19/2018.
Hashing - Hash Maps and Hash Functions
B+ Trees What are B+ Trees used for What is a B Tree What is a B+ Tree
Review Graph Directed Graph Undirected Graph Sub-Graph
Artificial Intelligence (CS 370D)
Hash Table.
Indexing, Access and Database System Architecture
Collision Resolution.
CSE 373: Data Structures and Algorithms
Presentation transcript:

Bit-State Space Exploration It’s a variation on reachability analysis The reachability analysis: –Keeps track of the already explored states –Performs full state space search –Most implementations use Hashing to quickly access an element on the table of already explored states

Bit-State Space Exploration Hashing function –Given a hash space table of H slots –and a Hashing function h(s) for A states –h(s) points a slot in the hash table without the need to search for the states in the whole table h(s)

In case of collision –the use of a linked list is a common option To minimize collision, two hashing functions are used. Bit-State Space Exploration h(s) S2S3S1

Bit-State Space Exploration Say we have two states s1 and s2. –With only one hash function, these are the possibilities: h(s1) = x and h(s2) = x or h(s1) = x and h(s2) = y

Bit-State Space Exploration Say now we use two hashing functions h1 and h2. The four possibilities are: h1(s1)=x, h1(s2)=x, h2(s1)=v, h2(s2)=w h1(s1)=x, h1(s2)=x, h2(s1)=v, h2(s2)=v h1(s1)=x, h1(s2)=y, h2(s1)=v, h2(s2)=w h1(s1)=x, h1(s2)=y, h2(s1)=v, h2(s2)=v Only the green shaded row causes collision. We have thus reduced collision risk.

Bit-State Space Exploration Memory space analysis –Hash table size (H) –Pointer size (B) –Hash table will occupy HxB bytes –State data will use (S+B)xA bytes –Total memory: HxB + (S+B)xA Example –H = 1,000,000, B=4  Table size = 4Mb –S and A depend on the specification under test next pointer state data size

Bit-State Space Exploration Workaround: Bit-state space exploration –By using a depth search algorithm, there is no need any more for storing the visited states, so: –M = HxB + (S+B)xA  M = H, or H/8, –where M is the total amount of memory used for the hash table. –Constraints Collision avoidance is a matter of probability of occurrence has to use depth search algorithm only goes until maximum depth is reached Because one state now can be represented by only one bit: reached (1), or not (0)

Bit-State Space Exploration Example 2: (Even better than previous) –if M = 1,000,000, H=8,000,000 –previous example: 4Mb = 10 6 states only for the hashing table –this example: 4Mb = 32x 10 6 states, and no need for extra storage for the states data

Bit-state Space exploration How it works –Storing the state data in a stack as it goes… –Go until any of the following conditions... G.S. 1 G.S. = Global State G.S. 1.1 G.S. 1.2 G.S. 1.3 G.S G.S G.S Depth-first

Bit-state Space exploration a) b) G.S. i No new state or possible action Simply backtrack in the stack G.S. i G.S. j (already visited) G.S. k No new state or possible action backtrack and go the next on the right

Bit-state Space exploration c) d) Problem encountered: –e.g. Unspecified reception, or deadlock –reads the whole stack, creates an MSC –adds a report to the list of reports with the MSC –backtrack and go again. Rem: For each new visited state (hash table bit = 0), sets the hash table to 1. G.S. i Maximum depth Simply backtrack

Bit-state Space exploration In the TAU Validator Bit-State space exploration tool, the results are like: –No of reports: No of reports generated –Generated states: No of global states generated –Truncated paths: No of states cut by the maximum depth constraint –Unique system states: No of unique global states from the generated ones –Size of hash table: The size of the hash table (H) –No of bits set in hash table: No of bits in the hash table set to 1 (visited) –Collision risk: the risk of having two states colliding in the same slot –Max Depth: the maximum depth set for this bit-state exploration –Current depth: the depth after the execution (should be -1 if went ok) –Min state size and Max state size: (limit sizes of states, used by h(s)) –Symbol coverage: The percentage of the SDL symbols covered