TelAviv University Programming Languages Seminar - PowerPoint PPT Presentation

1 / 37
About This Presentation
Title:

TelAviv University Programming Languages Seminar

Description:

correctness is topological in nature but we would ideally like something ... 'coin flipping' determines flow of information (probabilistic execution) ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 38
Provided by: mathT
Category:

less

Transcript and Presenter's Notes

Title: TelAviv University Programming Languages Seminar


1
Measuring the Precision of Abstract
Interpretations
  • Alessandra Di Pierro and Herbert Wiklicky
  • Moderator Roman Manevich

2
Motivation
Neil D.Jones and Flemming Nielson.Abstract
interpretation A semantic-based tool for program
analysis
One shortcoming of the development ... is that
a correct analysis may be so imprecise as to be
practically useless. ... The notion of
correctness is topological in nature but we
would ideally like something that was a bit more
metric in nature so that we could express how
imprecise a correct analysis is. Unfortunately
no one has been able to develop an adequate
metric for these purposes.
3
Outline
  • Probabilistic abstract interpretation
  • Construction of probabilistic abstract
    interpretations
  • Measuring probabilistic abstract interpretations
  • Examples
  • Related Work

4
Probabilistic Semantics
  • Probabilistic programs
  • coin flipping determines flow of information
    (probabilistic execution)
  • Distribution of results (r,prob(r))
  • Generalize deterministic programs

5
Classical Abstract Interpretation
  • Introduced by Patrick and Radhia Cousot 1977
  • Two semantics
  • Reference standard (concrete) semantics
  • Approximate (abstract) semantics
  • Over two domains lattices
  • The relation between them given byGalois
    Connection

6
Complete Lattices Reminder
  • A poset (L, ? ) is a complete lattice if every
    subset has least and upper bounds
  • L (L, ?) (L, ?, ?, ?, ?, ?)
  • ? ? ? ? L
  • ? ? L ? ?
  • Lemma For every poset (L, ? ) the following
    conditions are equivalent
  • L is a complete lattice
  • Every subset of L has a least upper bound
  • Every subset of L has a greatest lower bound

7
Galois Connections Revisited
  • Definition 1
  • Let C(C,?) and D(D, ?) be two posets
  • If ?C?D and ? D?C s.t for all c?C and
    d?Dc??(d) iff ?(c)?d
  • (C,?,?,D) forms a Galois Connection

8
Galois Connections Revisited
D
C
d
?
?(d)
?(c)
?
c
9
Galois Connections Revisited
  • Definition 2
  • Let C(C,?) and D(D, ?) be two posets
  • If ?C?D and ? D?C s.t ? and ? are monotone ?
    ? ? is reductive? ? ? is extensive
  • (C,?,?,D) forms a Galois Connection

10
Galois Connections Revisited
D
C
d
?
?(?(d))
?(?(c))
?
c
11
Galois Connections Revisited
C
C
???
12
Galois Connections Revisited
D
D
???
13
Probabilistic Abstract Interpretation
  • Probabilistic semantics
  • Two semantics
  • Reference standard (concrete) semantics
  • Approximate (abstract) semantics
  • Over two (probabilistic) domains vector spaces
  • The relation between them given by Moore-Penrose
    pseudo-inverse

14
Projections
  • A linear operator TV?V is a projection if T?TT
  • If T(V)W then for every v?Vvv?v?
  • v? will be abstracted T(v?)0v? will be
    preserved T(v?)v?

15
Projection Example
y
?((x,y))x?(x)(x,0)
x
16
Adjoint Orthogonal Operators
  • If T is a linear operator
  • exists unique T such that ?T(u),v??u,T(v)?
  • TTTTI ? TT-1
  • ?T(u),T(v)??u,v?
  • ?T(u)??u?

17
Orthogonal Projections
  • T is an orthogonal projection iff TT
  • For a linear map ?V?VThe map of ? ?(V)?W (a
    subspace of V)
  • There is a unique orthogonal projection??(v)W?W
    s.t. ??(v)(W)?(V)

18
Classic ? Probabilistic
  • ?,? Monotone ? Linear
  • ???(c)?c ? ?????
  • ???(d)?d ? ?????

19
Moore-Penrose Pseudo Inverse
  • C, D finite dimensional vector spaces
  • ?C?D
  • ??D?C is the (unique) Moore-Penrose Pseudo
    Inverse iff
  • ?????
  • ?????

20
Alternative Characterization
  • ?????? (also holds for GC)
  • ?????? (also holds for GC)
  • (???)???
  • (???)???

21
Probabilistic Abstract Interpretation
  • C,D two probabilistic domains
  • ?C?D and ? D?C linear maps
  • ?,? moore-penrose pseudo-inverse

22
Projection as Approximation
  • Let ?WV?V be an orthogonal projection.
  • For every x?V ?W(x) is the unique vector in
    Ws.t. ?x- ?W(x)? is minimal

23
Construction of ProbabilisticAbstract
Interpretations
  • Probabilistic induced analysis
  • Vector space lifting
  • General construction
  • Infinite dimensional abstractions

24
Vector Space Lifting
  • Recasting cpo based semantics in vector space
    setting
  • Similar to power space
  • If C is a cpo V(C)?xcc xc??, c?C

25
General (Classic) Construction
?
A
A
?
f
f
?
B
B
?
26
General (Classic) Construction
  • f A ? B is correct approximation of f
    iff? ? f ?B f ? ?
  • Best iff f ? ? f ? ?
  • Complete iff? ? f f ? ?

27
Measuring ProbabilisticAbstract Interpretations
  • Pseudo-quotient?(? ? f ) ? (f ? ?)? B ?
    B
  • (A,B, f ) is correct iff ????1complete iff
    ???1

28
Examples
  • Rule of sign
  • Multiplication
  • Addition
  • Cast out of nine

29
Rule of Signs
30
Rule of Signs Multiplication
?
V(Z2)
V(Sign2)
?
?
?
V(Z)
V(Sign)
31
Lifting Multiplication
  • V(Sign) R3- ? (1,0,0) 0 ? (0,1,0) ?
    (0,0,1)
  • V(Sign2) R6- ? - ? (1,0,0,0,0,0) - ? 0
    ? (0,1,0,0,0,0) 0 ? ? (0,0,1,0,0,0) 0 ? 0
    ? (0,0,0,1,0,0) 0 ? ? (0,0,0,0,1,0) ?
    ? (0,0,0,0,0,1)

(? ? ?) ? (? ? ?2) id ???1
32
Rule of Signs Addition
  • Qn(? ? ) ? ( ? ?2) for truncated
    computations in -n,n converges to
  • (1.0 0.0 0.0 0.0)(0.0 1.0 0.0 0.0)(0.0 0.0
    1.0 0.0)(0.5 0.0 0.5 0.0)
  • ???1.5

33
Cast by d
  • eval(abc) eval(a,b,c) - true if abc-
    false otherwise
  • ?N3?D3
  • eval D3?B ?false, ?true

34
Cast by d
?
V(D3)
V(N3)
eval
eval
id
V(B)
V(B)
35
Cast by d
  • SdV(B)?V(B)true ? (1,0)false ? (0,1)
  • Numerical experiments gave?S2?11.93 vs.
    ?S9?11.72

36
Related Work
  • Concurrent Constraint Programming Towards
    Probabilistic Abstract Interpretation /
    Alessandra Di Pierro and Herbert Wiklicky
  • Making Abstract Interpretations Complete
    /Roberto Giacobazzi, Francesco Ranzato
  • Data Flow Frequency Analysis / Ramalingam

37
The End
Write a Comment
User Comments (0)
About PowerShow.com