Semantic Minimization of 3-Valued Propositional Formulas

Slides:



Advertisements
Similar presentations
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Advertisements

Logic Gates.
Three Special Functions
Possible World Semantics for Modal Logic
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
3-Valued Logic Analyzer (TVP) Tal Lev-Ami and Mooly Sagiv.
Kripke: Outline …(1975) First improtant decision: the theory is about sentences, not about propositions. Like Tarski, not like Barwise & Etchemendy. ***
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
CSE Winter 2008 Introduction to Program Verification January 24 tautology checking, take 2.
1 CA 208 Logic Ex1 In your own words, define the following 1. Logic: 2. Valid reasoning/inference (2 equivalent definitions): 3. Propositions/statements:
Programming Language Semantics Inductive Definitions Mooly SagivEran Yahav Schrirber 317Open space
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
Model Checking of Concurrent Software: Current Projects Thomas Reps University of Wisconsin.
Lattice and Boolean Algebra
Propositional Calculus Math Foundations of Computer Science.
Boolean Algebra Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
BOOLEAN FUNCTION PROPERTIES
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
Boolean Algebra – the ‘Lingua Franca’ of the Digital World The goal of developing an automata is based on the following (loosely described) ‘ideal’: if.
Intro. to Logic CS402 Fall Propositional Calculus - Semantics (2/3) Propositional Calculus - Semantics (2/3) Moonzoo Kim CS Division of EECS Dept.
1 Automatic Refinement and Vacuity Detection for Symbolic Trajectory Evaluation Orna Grumberg Technion Haifa, Israel Joint work with Rachel Tzoref.
Formal Semantics of Programming Languages 虞慧群 Topic 3: Principles of Induction.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Extra slides for Chapter 3: Propositional Calculus & Normal Forms Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
Discrete Mathematics CS 2610 February 10, Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)
LOGIC. Logic in general  Logics are formal languages for representing information such that conclusions can be drawn  Syntax defines the sentences in.
1 Temporal logic. 2 Prop. logic: model and reason about static situations. Example: Are there truth values that can be assigned to x,y simultaneously.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
Boolean Algebra. BOOLEAN ALGEBRA Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either true(1) or false (0).
3-Valued Abstraction and 3-Valued Model-Checking.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
Program Analysis Last Lesson Mooly Sagiv. Goals u Show the significance of set constraints for CFA of Object Oriented Programs u Sketch advanced techniques.
Chapter 1 Logic and Proof.
The NP class. NP-completeness
Propositional Logic (a.k.a. Sentential Logic)
Lecture 7 Multi-Level Gate Networks
ECE 301 – Digital Electronics
Formal methods: Lecture
Properties of Triangles
Modal, Dynamic and Temporal Logics
L is in NP means: There is a language L’ in P and a polynomial p so that L1 ≤ L2 means: For some polynomial time computable map r :  x: x  L1 iff.
Boolean Algebra.
14:332:231 DIGITAL LOGIC DESIGN Boolean Algebra
Propositional Calculus: Boolean Functions and Expressions
Polynomial-Time Reduction
Section 7.1 Logical Operators
Logic Gates.
Logic Gates Benchmark Companies Inc PO Box Aurora CO
Exercises: First Order Logics (FOL)
Boolean Algebra – Part 1 ECEn 224.
Propositional Calculus: Boolean Functions and Expressions
Symbolic Implementation of the Best Transformer
Propositional Calculus: Boolean Algebra and Simplification
Discrete Mathematics CS 2610
Chapter 1 : Essentials of Geometry
Where Can We Draw The Line?
Chapter 2 Boolean Algebra and Logic Gate
ICS 353: Design and Analysis of Algorithms
Logic Gates.
CSC 4170 Theory of Computation The class NP Section 7.3.
Logics for Data and Knowledge Representation
Symbolic Characterization of Heap Abstractions
CS21 Decidability and Tractability
Introduction to verification
Program Verification with Hoare Logic
Boolean Algebra and Gate Networks
The Satisfiability Problem
Presentation transcript:

Semantic Minimization of 3-Valued Propositional Formulas Thomas Reps Alexey Loginov University of Wisconsin Mooly Sagiv Tel-Aviv University

Semantic Minimization p  p = 1, right? (A): Value of formula  under assignment A In 3-valued logic, (A) may equal ? p  p([p  0]) = 1 p  p([p  ?]) = ? p  p([p  1]) = 1 However, 1([p  0]) = 1 = p  p([p  0]) 1([p  ?]) = 1  ? = p  p([p  ?]) 1([p  1]) = 1 = p  p([p  1])

Motivation Dataflow analysis Hardware verification Shape analysis Symbolic trajectory evaluation Shape analysis Change example to xy + x’z vs xy + x’z + yz?

Questions What does “best” mean? Can one find a best formula? How? Quote Minato for Floor and ceiling? Generating minimal formulas is simpler and cleaner than it might seem.

Two- vs. Three-Valued Logic 1 Two-valued logic {0,1} {0} {1} Three-valued logic {0}  {0,1} {1}  {0,1}

Two- vs. Three-Valued Logic Two-valued logic Three-valued logic {1} {0,1} {0} 1 ½ 1

Two- vs. Three-Valued Logic 1 Two-valued logic {0} {1} Three-valued logic {0,1}

Two- vs. Three-Valued Logic 1 Two-valued logic ½ 1 Three-valued logic 0 3½ 1 3½

Boolean Connectives [Kleene]

Three-Valued Logic 1 ½ 0  ½ 1  ½ 1: True 0: False 1/2: Unknown A join semi-lattice: 0  1 = 1/2 ½ 1 Information order 0  ½ 1  ½

Semantic Minimization 1([p  0]) = 1 = p  p([p  0]) 1([p  ½]) = 1  ½ = p  p([p  ½]) 1([p  1]) = 1 = p  p([p  1]) 2-valued logic: 1 is equivalent to p  p 3-valued logic: 1 is better than p  p For a given , is there a best formula? Yes!

Minimal? x + x’ No! x  x’ Yes! xy + x’z xy + x’y’ xy + x’z+ yz

Rewrite Rules?     1     0 Change example to xy + x’z vs xy + x’z + yz?

2-Valued Propositional Meaning xi(a) = a(xi) (a) = 1 – (a) 1  2(a) = min(1(a), 2(a)) 1  2(a) = max(1(a), 2(a)) Change example to xy + x’z vs xy + x’z + yz?

3-Valued Propositional Meaning xi(a) = a(xi) (a) = 1 – (a) 1  2(a) = min(1(a), 2(a)) 1  2(a) = max(1(a), 2(a)) Change example to xy + x’z vs xy + x’z + yz?

3-Valued Propositional Meaning xi(A) = A(xi) (A) = 1 – (A) 1  2(A) = min(1(A), 2(A)) 1  2(A) = max(1(A), 2(A)) Change example to xy + x’z vs xy + x’z + yz?

Represented by A A = [ p  ½, q  0, r  1, s  ½ ] [ p  0, q  0, Change example to xy + x’z vs xy + x’z + yz? Represented by A

The Right Definition of “Best”? Observation If for all A, (A)  (A),  is better than  ½ 1 Change example to xy + x’z vs xy + x’z + yz?

The Right Definition of “Best”? Observation If for all A, (A)  (A),  is better than  0(A) = 0  ½ =  ½ (A) 0 is better than ½ 1(A) = 1  ½ =  ½ (A) 1 is better than ½ Change example to xy + x’z vs xy + x’z + yz?

“Potentially accepts ” Acceptance Device A   iff (A)  1 1 ½ ½ 1 Change example to xy + x’z vs xy + x’z + yz? “Potentially accepts ”

“Potentially rejects ” Acceptance Device A   iff (A)  0 1 ½ ½ 1 Change example to xy + x’z vs xy + x’z + yz? “Potentially rejects ”

Acceptance Device    Suppose that A represents a, and 3-valued 2-valued    Change example to xy + x’z vs xy + x’z + yz? Suppose that A represents a, and a  2-valued assignments. We want: If a  , then A   If a  , then A  

Acceptance Device ½ Suppose that A represents a, and 3-valued 2-valued ½ Change example to xy + x’z vs xy + x’z + yz? Suppose that A represents a, and a  2-valued assignments. We want: If a  ½, then A  0 If a  ½, then A  0  Violated!

Acceptance Device ½ Suppose that A represents a, and 3-valued 2-valued ½ Change example to xy + x’z vs xy + x’z + yz? Suppose that A represents a, and a  2-valued assignments. We want: If a  ½, then A  1 If a  ½, then A  1  Violated!

The Right Definition of “Best”? Observation If for all A, (A)  (A),  is better than  Change example to xy + x’z vs xy + x’z + yz? Not all “better” formulas preserve potential acceptance of 2-valued assignments

Supervaluational meaning What Does “Best” Mean? Supervaluational meaning (A) =  (a) a rep. by A Change example to xy + x’z vs xy + x’z + yz?

Semantic Minimization (A) = (A) Non-truth-functional semantics Truth-functional Minimization Change example to xy + x’z vs xy + x’z + yz?

Example p  p([p  ½]) =  p  p(a) = p  p([p  0]) = 1  1 = 1 = 1([p  ½]) Change example to xy + x’z vs xy + x’z + yz?

Example ½([p  ½]) =  ½(a) = ½([p  0])  ½([p  1]) = ½  ½ = ½ = ½([p  ½]) Change example to xy + x’z vs xy + x’z + yz?

Semantic Minimization (A) = (A) Non-truth-functional semantics Truth-functional Minimization Change example to xy + x’z vs xy + x’z + yz?  For all A, (A)  (A) “ is better than ”

Realization of a Monotonic Boolean Function [Blamey 1980] f  Formula[ f ] b  ½ 1 Change example to xy + x’z vs xy + x’z + yz? a  a’b + 1b + ab + a1 + ab’  (a’b’)’

Realization of a Monotonic Boolean Function [Blamey 1980] f  Formula[ f ] b ½ 1 Change example to xy + x’z vs xy + x’z + yz? a  a’b + ab + a1 + ab’  (a’b’ + 1b)’

  Formula[] Our Problem   Formula[] b ([½, 1]) =  (a) a{[0,1], [1,1]} = ([0,0])  ([1,1]) = 1  1 = 1 ½ 1 Change example to xy + x’z vs xy + x’z + yz? a

Special Case:  contains no occurrences of ½ or    contains no occurrences of ½ in corners b  ½ 1  a’b + 1b + ab + a1 + ab’  (a’b’)’ Change example to xy + x’z vs xy + x’z + yz? a  a’b + 1b + ab + a1 + ab’  (a’b’)’

Special Case:  contains no occurrences of ½ or    contains no occurrences of ½ in corners b b ½ 1  ½ 1 Change example to xy + x’z vs xy + x’z + yz? a a

How Do We Obtain ? Represent  with a pair floor:    ½ = 0 ceiling:    ½ = 1 Change example to xy + x’z vs xy + x’z + yz?

How Do We Obtain (, )? 0  (a.0, a.0) 1  (a.1, a.1) ½  (a.0, a.1) xi  (a.a(xi), a.a(xi)) ( f ,  f )  ( f ,  f ) ( f 1,  f1 )  ( f2 ,  f2 )  ( f 1   f2 ,  f1    f2 ) ( f 1,  f1 )  ( f2 ,  f2 )  ( f 1   f2 ,  f1    f2 ) BDD operations Change example to xy + x’z vs xy + x’z + yz?

Semantically Minimal Formula General case  primes(  )  ( primes(   )) When  contains no occurrences of ½ and   primes(  ) Quote Minato for Floor and ceiling? Generating minimal formulas is simpler and cleaner than it might seem.

Example Original formula () xy’+ x’z’+ yz Minimal formula () x’y + x’z’+ yz + xy’+ xz + y’z’ A (A) (A) [x  ½, y  0, z  0] 1 ½ [x  0, y  1, z  ½] 1 ½ [x  1, y  ½, z  1] 1 ½ Change example to xy + x’z vs xy + x’z + yz?

Example Original formula ( = if x then y else z) xy + x’z Minimal formula () xy+ x’z+ yz A (A) (A) [x  ½, y  1, z  1] 1 ½ Change example to xy + x’z vs xy + x’z + yz?

Demo Change example to xy + x’z vs xy + x’z + yz?

Related Work [Blamey 1980, 1986] [Godefroid & Bruns 2000] Realization of a monotonic Boolean function [Godefroid & Bruns 2000] Supervaluational (“thorough”) semantics for model checking partial Kripke structures For propositional formulas Deciding “(A)  1?” is NP-complete Quote Minato for Floor and ceiling? Generating minimal formulas is simpler and cleaner than it might seem.

Our Questions What does “best” mean? Can one find a best formula? How? For all A, (A) = (A) Can one find a best formula? Yes How? Create (, ) Return  primes(  )  ( primes(   )) Quote Minato for Floor and ceiling? Generating minimal formulas is simpler and cleaner than it might seem.

Change example to xy + x’z vs xy + x’z + yz?