Formal Verification Methods 2: Symbolic Simulation

Similar documents
Behavior models and verification Lecture 6

Motivation. CS389L: Automated Logical Reasoning. Lecture 5: Binary Decision Diagrams. Historical Context. Binary Decision Trees

Model Checking I Binary Decision Diagrams

Unit 4: Formal Verification

Formal Methods at Intel An Overview

Boolean Representations and Combinatorial Equivalence

Symbolic Trajectory Evaluation - A Survey

Digital Circuit Verification using Partially-Ordered State Models

Lecture1: Symbolic Model Checking with BDDs. Edmund M. Clarke, Jr. Computer Science Department Carnegie Mellon University Pittsburgh, PA 15213

Formal Verification. Lecture 7: Introduction to Binary Decision Diagrams (BDDs)

Overview. Discrete Event Systems - Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for?

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

A Toolbox for Counter-Example Analysis and Optimization

(Refer Slide Time 6:48)

Computer Organization and Levels of Abstraction

Symbolic Model Checking

Binary Decision Diagrams

EECS 219C: Formal Methods Binary Decision Diagrams (BDDs) Sanjit A. Seshia EECS, UC Berkeley

Lecture Notes on Binary Decision Diagrams

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

ALGORITHMS EXAMINATION Department of Computer Science New York University December 17, 2007

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Binary Decision Diagrams and Symbolic Model Checking

Computer Organization and Levels of Abstraction

Abstraction by Symbolic Indexing Transformations

Binary Decision Diagrams

BDDC v2 A basic bdd-based logical calculator

Chapter 8: Data Abstractions

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning

LECTURE 4. Logic Design

Boolean Functions (Formulas) and Propositional Logic

Logic Synthesis & Optimization Lectures 4, 5 Boolean Algebra - Basics

Lecture 7: Counting classes

Advanced VLSI Design Prof. Virendra K. Singh Department of Electrical Engineering Indian Institute of Technology Bombay

BDDC v2 A basic bdd-based logical calculator

Chapter 7 Control I Expressions and Statements

ECE 5775 (Fall 17) High-Level Digital Design Automation. Binary Decision Diagrams Static Timing Analysis

Lecture 1 Contracts. 1 A Mysterious Program : Principles of Imperative Computation (Spring 2018) Frank Pfenning

Representations of Terms Representations of Boolean Networks

L3: Representations of functions

Exam Principles of Imperative Computation, Summer 2011 William Lovas. June 24, 2011

Formal verification of floating-point arithmetic at Intel

VLSI Logic Test, Validation and Verification Lecture 7 Properties & Applications of Binary Decision Diagrams

A Logically Complete Reasoning Maintenance System Based on a Logical Constraint Solver

Chapter 8. NP-complete problems

Formal Verification in Industry

Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012

8. Symbolic Trajectory Evaluation, Term Rewriting. Motivation for Symbolic Trajectory Evaluation

Binary Decision Diagrams

Specifying logic functions

Logic and Computation

Propositional Calculus. Math Foundations of Computer Science

NP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions.

Reliable Verification Using Symbolic Simulation with Scalar Values

Model Finder. Lawrence Chung 1

Simplified Digital Logic Circuits Using Binary Decision Tree

Arithmetic Processing

POWR IP PZ1/17

Interplay Between Language and Formal Verification

1/28/2013. Synthesis. The Y-diagram Revisited. Structural Behavioral. More abstract designs Physical. CAD for VLSI 2

CS 3EA3: Sheet 9 Optional Assignment - The Importance of Algebraic Properties

Boolean Analysis of Logic Circuits

CS1800 Discrete Structures Final Version A

ECE 587 Hardware/Software Co-Design Lecture 11 Verification I

Class Structure. Prerequisites

Lecture (04) Boolean Algebra and Logic Gates

Lecture (04) Boolean Algebra and Logic Gates By: Dr. Ahmed ElShafee

(Refer Slide Time 3:31)

C++ Programming: From Problem Analysis to Program Design, Fourth Edition. Chapter 4: Control Structures I (Selection)

Lecture 2: NP-Completeness

Binary Decision Diagrams (BDD)

Umans Complexity Theory Lectures

Universität Ulm Fakultät für Informatik

Plan of the lecture. G53RDB: Theory of Relational Databases Lecture 1. Textbook. Practicalities: assessment. Aims and objectives of the course

1 Model checking and equivalence checking

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

Lecture Notes on Data Representation

Chapter 6: Multilevel Combinational Circuits. Name: Lương Văn Minh No. :

Introduction to CS 270 Math Foundations of CS

Set Manipulation with Boolean Functional Vectors for Symbolic Reachability Analysis

EECS 140 Laboratory Exercise 5 Prime Number Recognition

Lecture 6: Arithmetic and Threshold Circuits

Lecture 14: Lower Bounds for Tree Resolution

Fundamentals of Digital System Design ECE 3700, CPSC 3700

EEE130 Digital Electronics I Lecture #4_1

Propositional Calculus. Math Foundations of Computer Science

Exercises Computational Complexity

Summer 2017 Discussion 10: July 25, Introduction. 2 Primitives and Define

CS1004: Intro to CS in Java, Spring 2005

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

L4: Binary Decision Diagrams. Reading material

LIMITATIONS OF COMPUTING. Introduction to Computer Engineering 2015 Spring by Euiseong Seo

CPSC 121: Models of Computation

Electronic Engineering Part 1 Laboratory Experiment. Digital Circuit Design 1 Combinational Logic. (3 hours)

(Refer Slide Time 5:19)

DIGITAL SYSTEM DESIGN

CS 314 Principles of Programming Languages

Lecture 22: Implementing Combinational Logic

Unit 8: Coping with NP-Completeness. Complexity classes Reducibility and NP-completeness proofs Coping with NP-complete problems. Y.-W.

Lecture Notes on Dynamic Programming

Transcription:

Formal Verification Methods 2: Symbolic Simulation John Harrison Intel Corporation Marktoberdorf 2003 Thu 3st July 2003 (:25 2:0) 0

Summary Simulation Symbolic and ternary simulation BDDs Quaternary lattice Symbolic trajectory evaluation

Simulation The traditional method for testing and debugging hardware designs is simulation. This is just testing, done on a formal circuit model. 0 0 0 0 7-input AND gate 0 Feed sets of arguments in as inputs, and check whether the output is as expected. 2

Generalizations of Simulation We can generalize basic simulation in two different ways: Ternary simulation, where as well as 0 and we have a don t care value. Symbolic simulation, where inputs may be parametrized by Boolean variables, and outputs are functions of those variables. Rather surprisingly, it s especially useful to do both at the same time, and have ternary values parametrized by Boolean variables. This leads on to symbolic trajectory evaluation (STE) and its generalizations. 3

Example of symbolic simulation We might use Boolean variables for all inputs: a 6 a 5 a 4 a 3 a 2 a a 0 7-input AND gate a 0 a 6 or just some of them: x 7-input AND gate x 4

Example of ternary simulation If some inputs are undefined, the output often is too: 7-input AND gate but not always: 0 7-input AND gate 0 5

Economies Consider the 7-input AND gate. To verify it exhaustively: In conventional simulation, we would need 28 test cases, 0000000, 000000,...,. In symbolic simulation, we only need symbolic test case, a 0 a a 2 a 3 a 4 a 5 a 6, but need to manipulate expressions, not just constants. In ternary simulation, we need 8 test cases, 0, 0,..., 0 and. If we combine symbolic and ternary simulation, we can parametrize the 8 test cases by just 3 Boolean variables. This makes the manipulation of expressions much more economical. 6

Representing Boolean expressions We could just represent Boolean expressions as formulas in the usual way. Need to check equivalence of ouput expression and expectation Essentially the same approach as in previous lecture Main alternative is to use a canonical representation for Boolean formulas. Testing equivalence is trivial (are the expressions the same?) There is more work in composing the operations internally The most popular canonical representation is (reduced ordered) binary decision diagrams (BDDs). 7

BDDs (Reduced Ordered) Binary decision diagrams represent Boolean functions as decision trees, but share common subtrees to give a directed acyclic graph structure. A canonical variable ordering is imposed, so variables occur in the same order along all paths. This makes BDDs a canonical representation, so comparison of Boolean functions is constant time. Moreover, Boolean operations are polynomial time, and they are often surprisingly compact for functions of interest. Some functions such as multipliers have no efficient representation. The variable ordering can make a big difference! 8

BDD example a a b c c c e e e e d b b b b e d d f f 0 0 9

Quaternary simulation It s theoretically convenient to generalize ternary to quaternary simulation, introducing an overconstrained value T. We can think of each quaternary value as standing for a set of possible values: T = {} 0 = {0} = {} = {0, } This is essentially a simple case of an abstraction mapping. 0

Quaternary lattice We consider the quaternary values laid out in an information ordering: T 0 The lattice ordering indicates that one value has more information than another.

Extended truth tables The truth-tables for basic gates are extended: p q p q p q p q p q 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Composing gates in this simple way, we may lose information. 2

Parametrizing quaternary values Parametrize sets of quaternary values using Boolean variables: a 0 = if p q r 0 if p q r otherwise... a 6 = if p q r 0 if p q r otherwise We can represent quaternary values as a pair of Boolean values during simulation, and thus use the standard BDD representation in terms of the parameters. 3

Symbolic trajectory evaluation Symbolic trajectory evaluation (STE) is a further development of ternary symbolic simulation. The user can write specifications in a restricted temporal logic, specifying the behaviour over bounded-length trajectories (sequences of circuit states). A typical specification would be: if the current state satisfies a property P, then after n time steps, the state will satisfy the property Q. The circuit can then be checked against this specification by symbolic quaternary simulation. STE is used extensively at Intel. 4

Summary Simulation is the standard technique for testing and debugging circuit designs The two generalizations to ternary and symbolic simulation are independently valuable. A canonical representation of Boolean functions using BDDs often works well We can generalize simulation to quaternary simulation, considering it as an abstraction mapping STE arises by combining symbolic and ternary simulation, and using it to check properties expressed in a simple temporal logic. 5