Presentation is loading. Please wait.

Presentation is loading. Please wait.

Semantic Minimization of 3-Valued Propositional Formulas

Similar presentations


Presentation on theme: "Semantic Minimization of 3-Valued Propositional Formulas"— Presentation transcript:

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

2 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]) = = p  p([p  0]) 1([p  ?]) = 1  ? = p  p([p  ?]) 1([p  1]) = = p  p([p  1])

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

4 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.

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

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

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

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

9 Boolean Connectives [Kleene]

10 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  ½

11 Semantic Minimization
1([p  0]) = = p  p([p  0]) 1([p  ½]) = 1  ½ = p  p([p  ½]) 1([p  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!

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

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

14 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?

15 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?

16 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?

17 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

18 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?

19 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?

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

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

22 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  

23 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!

24 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!

25 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

26 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?

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

28 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?

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

30 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 ”

31 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’)’

32 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)’

33   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

34 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’)’

35 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

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

37 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?

38 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.

39 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] ½ [x  0, y  1, z  ½] ½ [x  1, y  ½, z  1] ½ Change example to xy + x’z vs xy + x’z + yz?

40 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] ½ Change example to xy + x’z vs xy + x’z + yz?

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

42 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.

43 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.

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


Download ppt "Semantic Minimization of 3-Valued Propositional Formulas"

Similar presentations


Ads by Google