SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
Domains        The Octagon Domain    Abstract Transfer Functions   Analysis Example   Conclusion




                                The Octagon Domain

                                    Bernhard Mallinger



                                    March 6-7th, 2013




Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Outline


      1   Domains

      2   The Octagon Domain

      3   Abstract Transfer Functions

      4   Analysis Example

      5   Conclusion



Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Outline


      1   Domains

      2   The Octagon Domain

      3   Abstract Transfer Functions

      4   Analysis Example

      5   Conclusion



Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain      Abstract Transfer Functions   Analysis Example   Conclusion




Recap: Abstract Domains


             Models states/properties in abstract interpretation of programs
             Manipulated by abstract transfer functions
             Can be composed of different kinds of elements
                     Properties (e.g. sign, is even)
                     Numeric values, intervals
                     Relations
             Examples
                     Sign Domain
                     Interval Domain
                     Polyhedra Domain



Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Numerical Domains I




      Figure: • represent elements of the domain, spurious elements are marked
              by ×. Domains always overapproximate in order to be sound.
                 (figure from Miné (2006))


Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain        Abstract Transfer Functions   Analysis Example   Conclusion




Numerical Domains II



      Assumption: Numeric means R

      Interval Domain: Xi ∈ [ai , bi ]
      Polyhedra Domain:             i   aij Xi ≤ bj
      Zone Abstract Domain: ±Xi ≤ ci ,                     Xi − Xj ≤ cij     ∀i = j
      Octagon Domain: ±Xi ± Xj ≤ cij                    ∀i, j




Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain        Abstract Transfer Functions   Analysis Example   Conclusion




Numerical Domains II



      Assumption: Numeric means R

      Interval Domain: Xi ∈ [ai , bi ]
      Polyhedra Domain:             i   aij Xi ≤ bj
      Zone Abstract Domain: ±Xi ≤ ci ,                     Xi − Xj ≤ cij     ∀i = j
      Octagon Domain: ±Xi ± Xj ≤ cij                    ∀i, j




Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain        Abstract Transfer Functions   Analysis Example   Conclusion




Numerical Domains II



      Assumption: Numeric means R

      Interval Domain: Xi ∈ [ai , bi ]
      Polyhedra Domain:             i   aij Xi ≤ bj
      Zone Abstract Domain: ±Xi ≤ ci ,                     Xi − Xj ≤ cij     ∀i = j
      Octagon Domain: ±Xi ± Xj ≤ cij                    ∀i, j




Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain        Abstract Transfer Functions   Analysis Example   Conclusion




Numerical Domains II



      Assumption: Numeric means R

      Interval Domain: Xi ∈ [ai , bi ]
      Polyhedra Domain:             i   aij Xi ≤ bj
      Zone Abstract Domain: ±Xi ≤ ci ,                     Xi − Xj ≤ cij     ∀i = j
      Octagon Domain: ±Xi ± Xj ≤ cij                    ∀i, j




Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Numerical Domains III



             In terms of precision: Interval < Octagon < Polyhedra
             Interval Domain is non-relational
             Polyhedra Domain has theoretically unbounded cost
             (exponentially in practise)
             Octagon domain limited to two variables per inequality and no
             coefficients
             ⇒ Quadratic memory/cubic time cost




Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Motivation: Relational Domains




      Not only properties of variables are of interest,
      but also the relation among them:
        1 Y := X;
        2 Z := X - Y;
        3 Z := 4/Z;




Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Outline


      1   Domains

      2   The Octagon Domain

      3   Abstract Transfer Functions

      4   Analysis Example

      5   Conclusion



Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain    Abstract Transfer Functions   Analysis Example   Conclusion




Representation: Difference bound matrices I


             Constraints: ±X ± Y ≤ c
             ⇒ 2n × 2n matrix m

             Concretisation function γ:
                             def
                     γ (m) = {(v1 , . . . , vn ) ∈ Rn | ∀i, j : vj − vi ≤ mij }

                     def
              γ(m) = {(v1 , . . . , vn ) ∈ Rn | (v1 , −v1 , . . . , vn , −vn ) ∈ γ (m)}




Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain    Abstract Transfer Functions   Analysis Example   Conclusion




Representation: Difference bound matrices I


             Constraints: ±X ± Y ≤ c
             ⇒ 2n × 2n matrix m

             Concretisation function γ:
                             def
                     γ (m) = {(v1 , . . . , vn ) ∈ Rn | ∀i, j : vj − vi ≤ mij }

                     def
              γ(m) = {(v1 , . . . , vn ) ∈ Rn | (v1 , −v1 , . . . , vn , −vn ) ∈ γ (m)}




Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain    Abstract Transfer Functions   Analysis Example   Conclusion




Representation: Difference bound matrices I


             Constraints: ±X ± Y ≤ c
             ⇒ 2n × 2n matrix m

             Concretisation function γ:
                             def
                     γ (m) = {(v1 , . . . , vn ) ∈ Rn | ∀i, j : vj − vi ≤ mij }

                     def
              γ(m) = {(v1 , . . . , vn ) ∈ Rn | (v1 , −v1 , . . . , vn , −vn ) ∈ γ (m)}




Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain    Abstract Transfer Functions   Analysis Example   Conclusion




                               Figure: Octagon representation
                                  (figure from Miné (2006))

Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain       Abstract Transfer Functions   Analysis Example   Conclusion




Representation: Difference bound matrices II

             Abstraction function α:
             Given concrete values, α computes all entries of m by taking
             the maximal differences for each pair of variables
             A lattice can be defined:
                                               def
                                    m     n ⇐⇒ ∀i, j : mij ≤ nij
                                                     def
                                    (m      n)ij = max(mij , nij )
                                                     def
                                    (m      n)ij = min(mij , nij )

             m       n ⇒ γ(m) ⊆ γ(n)
             (γ, α) form a Galois connection


Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain      Abstract Transfer Functions   Analysis Example   Conclusion




                      Figure: Problem: Representation is not unique
                                    (figure from Miné (2006))


Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain      Abstract Transfer Functions   Analysis Example   Conclusion




Shortest Path Closure



             Calculating all-pairs shortest paths yield smallest (closed) m∗

                                    m∗ = inf {n | γ(m) = γ(n)}

             All bounds are as tight as possible (Saturation)
             Cubic time complexity (e.g. Floyd-Warshall)
             Negative cost cycle in m ⇐⇒ γ(m) = ∅




Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Outline


      1   Domains

      2   The Octagon Domain

      3   Abstract Transfer Functions

      4   Analysis Example

      5   Conclusion



Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Abstract Transfer Functions


             Abstract transfer functions correspond to semantic operations
             Must be sound, therefore overapproximation
             Some require closed arguments, some return closed ones
      Different kinds:
             Set operations such as Union/Intersection
             Assignment
             Test
             Widening/Narrowing
             Conversions to other domains (e.g. Interval, Polyhedra)


Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Union




             Take largest bounds elementwise:
                                                  def
                                       m∪n = m               n
             Union of two octagons isn’t an octagon in general
             ⇒ exact abstractions isn’t possible, only best abstraction
             Best abstraction is obtained if m and n are closed
Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Intersection




             Definition similar to union, but result is always exact




Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Forget-Operator




      Figure: Non-deterministic behaviour can be modeled
              by “forgetting” constraints, but closure is necessary
                 (figure from Miné (2006))


Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Assignment I

             Handling of assignments depends on the type of the expression
             Directly handleable in the octagon domain:

                                           X ← ±[a, b]
                                    X ← ±Y ± [a, b]

             e.g. for X ← Y + [a, b], we get a ≤ X − Y ≤ b:

                        +X − −Y ≤ b                 − X − +Y ≤ −a
                        −Y − +X ≤ b                 + Y − −X ≤ −a

             Constraints for X w.r.t. other variables have to be discarded

Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Assignment II



             In case the expression is too complex:
             ⇒ Transform everything to Interval or Polyhedra domain and
             do assignment there
             If using the Interval domain, new constraints can be derived by
             computing bounds of ±expr ± Y
             Using the Polyhedra domain is applicable to linear expressions
             and costly, but yields a best abstraction




Bernhard Mallinger
The Octagon Domain
Domains         The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Test


          1   X := [-100, 100]
          2   if X ≥ 0 then
          3       // X ∈ [0, 100]
          4   end if
              All tests can be simplified to expr ≤ 0
              Octagonally shaped tests can directly be applied
              (e.g. X + Y + [a, b] ≤ 0)
              More complex forms can be handled in the Interval or
              Polyhedra domain (cf. Assignment)



Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Outline


      1   Domains

      2   The Octagon Domain

      3   Abstract Transfer Functions

      4   Analysis Example

      5   Conclusion



Bernhard Mallinger
The Octagon Domain
Domains         The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




          1   X := [-100, 100]
          2   Y := X
          3   if Y ≤ 0 then
          4       1 Y := -Y 2
          5   else
          6       3
          7   end if
          8   4
        9     if Y ≤ 69 then 5
       10     end if

      1   −100 ≤ X ≤ 0 ∧ −100 ≤ Y ≤ 0 ∧ X − Y = 0 ∧ −200 ≤ X + Y ≤ 0
      2   −100 ≤ X ≤ 0 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ X + Y = 0
      3   0 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ X − Y = 0 ∧ 0 ≤ X + Y ≤ 200
      4   −100 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 200
      5   −69 ≤ X ≤ 69 ∧ 0 ≤ Y ≤ 69 ∧ −138 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 138


Bernhard Mallinger
The Octagon Domain
Domains         The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




          1   X := [-100, 100]
          2   Y := X
          3   if Y ≤ 0 then
          4       1 Y := -Y 2
          5   else
          6       3
          7   end if
          8   4
        9     if Y ≤ 69 then 5
       10     end if

      1   −100 ≤ X ≤ 0 ∧ −100 ≤ Y ≤ 0 ∧ X − Y = 0 ∧ −200 ≤ X + Y ≤ 0
      2   −100 ≤ X ≤ 0 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ X + Y = 0
      3   0 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ X − Y = 0 ∧ 0 ≤ X + Y ≤ 200
      4   −100 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 200
      5   −69 ≤ X ≤ 69 ∧ 0 ≤ Y ≤ 69 ∧ −138 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 138


Bernhard Mallinger
The Octagon Domain
Domains         The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




          1   X := [-100, 100]
          2   Y := X
          3   if Y ≤ 0 then
          4       1 Y := -Y 2
          5   else
          6       3
          7   end if
          8   4
        9     if Y ≤ 69 then 5
       10     end if

      1   −100 ≤ X ≤ 0 ∧ −100 ≤ Y ≤ 0 ∧ X − Y = 0 ∧ −200 ≤ X + Y ≤ 0
      2   −100 ≤ X ≤ 0 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ X + Y = 0
      3   0 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ X − Y = 0 ∧ 0 ≤ X + Y ≤ 200
      4   −100 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 200
      5   −69 ≤ X ≤ 69 ∧ 0 ≤ Y ≤ 69 ∧ −138 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 138


Bernhard Mallinger
The Octagon Domain
Domains         The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




          1   X := [-100, 100]
          2   Y := X
          3   if Y ≤ 0 then
          4       1 Y := -Y 2
          5   else
          6       3
          7   end if
          8   4
        9     if Y ≤ 69 then 5
       10     end if

      1   −100 ≤ X ≤ 0 ∧ −100 ≤ Y ≤ 0 ∧ X − Y = 0 ∧ −200 ≤ X + Y ≤ 0
      2   −100 ≤ X ≤ 0 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ X + Y = 0
      3   0 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ X − Y = 0 ∧ 0 ≤ X + Y ≤ 200
      4   −100 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 200
      5   −69 ≤ X ≤ 69 ∧ 0 ≤ Y ≤ 69 ∧ −138 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 138


Bernhard Mallinger
The Octagon Domain
Domains         The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




          1   X := [-100, 100]
          2   Y := X
          3   if Y ≤ 0 then
          4       1 Y := -Y 2
          5   else
          6       3
          7   end if
          8   4
        9     if Y ≤ 69 then 5
       10     end if

      1   −100 ≤ X ≤ 0 ∧ −100 ≤ Y ≤ 0 ∧ X − Y = 0 ∧ −200 ≤ X + Y ≤ 0
      2   −100 ≤ X ≤ 0 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ X + Y = 0
      3   0 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ X − Y = 0 ∧ 0 ≤ X + Y ≤ 200
      4   −100 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 200
      5   −69 ≤ X ≤ 69 ∧ 0 ≤ Y ≤ 69 ∧ −138 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 138


Bernhard Mallinger
The Octagon Domain
Domains         The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




          1   X := [-100, 100]
          2   Y := X
          3   if Y ≤ 0 then
          4       1 Y := -Y 2
          5   else
          6       3
          7   end if
          8   4
        9     if Y ≤ 69 then 5
       10     end if

      1   −100 ≤ X ≤ 0 ∧ −100 ≤ Y ≤ 0 ∧ X − Y = 0 ∧ −200 ≤ X + Y ≤ 0
      2   −100 ≤ X ≤ 0 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ X + Y = 0
      3   0 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ X − Y = 0 ∧ 0 ≤ X + Y ≤ 200
      4   −100 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 200
      5   −69 ≤ X ≤ 69 ∧ 0 ≤ Y ≤ 69 ∧ −138 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 138


Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain   Abstract Transfer Functions   Analysis Example   Conclusion




Outline


      1   Domains

      2   The Octagon Domain

      3   Abstract Transfer Functions

      4   Analysis Example

      5   Conclusion



Bernhard Mallinger
The Octagon Domain
Domains        The Octagon Domain     Abstract Transfer Functions   Analysis Example   Conclusion




Conclusion


             The Octagon domain adds limited relational information to the
             Interval Domain
             As opposed to the Polyhedra domain (exponential worst case),
             its operations are still in P
             A normal form can be computed using Shortest Path Closure
             ⇒ necessary for emptiness testing and comparison
             Has been employed successfully in ASTRÉE to analyse a large
             C-program (airplane control software)
                     Reduction of false alarms with reasonable overhead
                     Only relevant relations are considered (“packs” of variables)



Bernhard Mallinger
The Octagon Domain

Weitere ähnliche Inhalte

Was ist angesagt?

Optimization Techniques
Optimization TechniquesOptimization Techniques
Optimization TechniquesAjay Bidyarthy
 
An Introduction to Model Order Reduction
An Introduction to Model Order ReductionAn Introduction to Model Order Reduction
An Introduction to Model Order ReductionMohammad Umar Rehman
 
A note on word embedding
A note on word embeddingA note on word embedding
A note on word embeddingKhang Pham
 
Parallel Evaluation of Multi-Semi-Joins
Parallel Evaluation of Multi-Semi-JoinsParallel Evaluation of Multi-Semi-Joins
Parallel Evaluation of Multi-Semi-JoinsJonny Daenen
 
Applying Model Checking Approach with Floating Point Arithmetic for Verificat...
Applying Model Checking Approach with Floating Point Arithmetic for Verificat...Applying Model Checking Approach with Floating Point Arithmetic for Verificat...
Applying Model Checking Approach with Floating Point Arithmetic for Verificat...Sergey Staroletov
 
Programacion Cuadratica
Programacion CuadraticaProgramacion Cuadratica
Programacion Cuadraticapaquitootd
 
Functional analysis in mechanics 2e
Functional analysis in mechanics  2eFunctional analysis in mechanics  2e
Functional analysis in mechanics 2eSpringer
 
Functional analysis in mechanics
Functional analysis in mechanicsFunctional analysis in mechanics
Functional analysis in mechanicsSpringer
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexityAnkit Katiyar
 
hankel_norm approximation_fir_ ijc
hankel_norm approximation_fir_ ijchankel_norm approximation_fir_ ijc
hankel_norm approximation_fir_ ijcVasilis Tsoulkas
 
Sampling and Markov Chain Monte Carlo Techniques
Sampling and Markov Chain Monte Carlo TechniquesSampling and Markov Chain Monte Carlo Techniques
Sampling and Markov Chain Monte Carlo TechniquesTomasz Kusmierczyk
 
Design and analysis of algorithm
Design and analysis of algorithmDesign and analysis of algorithm
Design and analysis of algorithmVarun Ojha
 
Symbolic Execution as DPLL Modulo Theories
Symbolic Execution as DPLL Modulo TheoriesSymbolic Execution as DPLL Modulo Theories
Symbolic Execution as DPLL Modulo TheoriesQuoc-Sang Phan
 
Modification of a heuristic method
Modification of a heuristic methodModification of a heuristic method
Modification of a heuristic methodorajjournal
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihmSajid Marwat
 
FURTHER RESULTS ON THE DIRAC DELTA APPROXIMATION AND THE MOMENT GENERATING FU...
FURTHER RESULTS ON THE DIRAC DELTA APPROXIMATION AND THE MOMENT GENERATING FU...FURTHER RESULTS ON THE DIRAC DELTA APPROXIMATION AND THE MOMENT GENERATING FU...
FURTHER RESULTS ON THE DIRAC DELTA APPROXIMATION AND THE MOMENT GENERATING FU...IJCNC
 

Was ist angesagt? (20)

Optimization Techniques
Optimization TechniquesOptimization Techniques
Optimization Techniques
 
An Introduction to Model Order Reduction
An Introduction to Model Order ReductionAn Introduction to Model Order Reduction
An Introduction to Model Order Reduction
 
PMF BPMF and BPTF
PMF BPMF and BPTFPMF BPMF and BPTF
PMF BPMF and BPTF
 
A note on word embedding
A note on word embeddingA note on word embedding
A note on word embedding
 
Parallel Evaluation of Multi-Semi-Joins
Parallel Evaluation of Multi-Semi-JoinsParallel Evaluation of Multi-Semi-Joins
Parallel Evaluation of Multi-Semi-Joins
 
Applying Model Checking Approach with Floating Point Arithmetic for Verificat...
Applying Model Checking Approach with Floating Point Arithmetic for Verificat...Applying Model Checking Approach with Floating Point Arithmetic for Verificat...
Applying Model Checking Approach with Floating Point Arithmetic for Verificat...
 
Programacion Cuadratica
Programacion CuadraticaProgramacion Cuadratica
Programacion Cuadratica
 
Functional analysis in mechanics 2e
Functional analysis in mechanics  2eFunctional analysis in mechanics  2e
Functional analysis in mechanics 2e
 
Functional analysis in mechanics
Functional analysis in mechanicsFunctional analysis in mechanics
Functional analysis in mechanics
 
Dk32696699
Dk32696699Dk32696699
Dk32696699
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexity
 
hankel_norm approximation_fir_ ijc
hankel_norm approximation_fir_ ijchankel_norm approximation_fir_ ijc
hankel_norm approximation_fir_ ijc
 
Sampling and Markov Chain Monte Carlo Techniques
Sampling and Markov Chain Monte Carlo TechniquesSampling and Markov Chain Monte Carlo Techniques
Sampling and Markov Chain Monte Carlo Techniques
 
Design and analysis of algorithm
Design and analysis of algorithmDesign and analysis of algorithm
Design and analysis of algorithm
 
Symbolic Execution as DPLL Modulo Theories
Symbolic Execution as DPLL Modulo TheoriesSymbolic Execution as DPLL Modulo Theories
Symbolic Execution as DPLL Modulo Theories
 
Modification of a heuristic method
Modification of a heuristic methodModification of a heuristic method
Modification of a heuristic method
 
Sm421 rg
Sm421 rgSm421 rg
Sm421 rg
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihm
 
15
1515
15
 
FURTHER RESULTS ON THE DIRAC DELTA APPROXIMATION AND THE MOMENT GENERATING FU...
FURTHER RESULTS ON THE DIRAC DELTA APPROXIMATION AND THE MOMENT GENERATING FU...FURTHER RESULTS ON THE DIRAC DELTA APPROXIMATION AND THE MOMENT GENERATING FU...
FURTHER RESULTS ON THE DIRAC DELTA APPROXIMATION AND THE MOMENT GENERATING FU...
 

Ähnlich wie The Octagon Abstract Domain

Elementary Landscape Decomposition of the Hamiltonian Path Optimization Problem
Elementary Landscape Decomposition of the Hamiltonian Path Optimization ProblemElementary Landscape Decomposition of the Hamiltonian Path Optimization Problem
Elementary Landscape Decomposition of the Hamiltonian Path Optimization Problemjfrchicanog
 
Convex optmization in communications
Convex optmization in communicationsConvex optmization in communications
Convex optmization in communicationsDeepshika Reddy
 
Mesh simplification notes
Mesh simplification notesMesh simplification notes
Mesh simplification notesManchor Ko
 
HOME ASSIGNMENT omar ali.pptx
HOME ASSIGNMENT omar ali.pptxHOME ASSIGNMENT omar ali.pptx
HOME ASSIGNMENT omar ali.pptxSayedulHassan1
 
HOME ASSIGNMENT (0).pptx
HOME ASSIGNMENT (0).pptxHOME ASSIGNMENT (0).pptx
HOME ASSIGNMENT (0).pptxSayedulHassan1
 
Module-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfModule-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfvikasmittal92
 
香港六合彩
香港六合彩香港六合彩
香港六合彩baoyin
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video searchzukun
 
4optmizationtechniques-150308051251-conversion-gate01.pdf
4optmizationtechniques-150308051251-conversion-gate01.pdf4optmizationtechniques-150308051251-conversion-gate01.pdf
4optmizationtechniques-150308051251-conversion-gate01.pdfBechanYadav4
 
7_Intro_to_Functions
7_Intro_to_Functions7_Intro_to_Functions
7_Intro_to_Functionsnechamkin
 

Ähnlich wie The Octagon Abstract Domain (20)

Elementary Landscape Decomposition of the Hamiltonian Path Optimization Problem
Elementary Landscape Decomposition of the Hamiltonian Path Optimization ProblemElementary Landscape Decomposition of the Hamiltonian Path Optimization Problem
Elementary Landscape Decomposition of the Hamiltonian Path Optimization Problem
 
Convex optmization in communications
Convex optmization in communicationsConvex optmization in communications
Convex optmization in communications
 
Subquad multi ff
Subquad multi ffSubquad multi ff
Subquad multi ff
 
Integration
IntegrationIntegration
Integration
 
Mesh simplification notes
Mesh simplification notesMesh simplification notes
Mesh simplification notes
 
HOME ASSIGNMENT omar ali.pptx
HOME ASSIGNMENT omar ali.pptxHOME ASSIGNMENT omar ali.pptx
HOME ASSIGNMENT omar ali.pptx
 
HOME ASSIGNMENT (0).pptx
HOME ASSIGNMENT (0).pptxHOME ASSIGNMENT (0).pptx
HOME ASSIGNMENT (0).pptx
 
MUMS: Bayesian, Fiducial, and Frequentist Conference - Model Selection in the...
MUMS: Bayesian, Fiducial, and Frequentist Conference - Model Selection in the...MUMS: Bayesian, Fiducial, and Frequentist Conference - Model Selection in the...
MUMS: Bayesian, Fiducial, and Frequentist Conference - Model Selection in the...
 
Ba26343346
Ba26343346Ba26343346
Ba26343346
 
Module-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfModule-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdf
 
Reginf pldi3
Reginf pldi3Reginf pldi3
Reginf pldi3
 
香港六合彩
香港六合彩香港六合彩
香港六合彩
 
Chapter 4 Integration
Chapter 4  IntegrationChapter 4  Integration
Chapter 4 Integration
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video search
 
4optmizationtechniques-150308051251-conversion-gate01.pdf
4optmizationtechniques-150308051251-conversion-gate01.pdf4optmizationtechniques-150308051251-conversion-gate01.pdf
4optmizationtechniques-150308051251-conversion-gate01.pdf
 
Optmization techniques
Optmization techniquesOptmization techniques
Optmization techniques
 
optmizationtechniques.pdf
optmizationtechniques.pdfoptmizationtechniques.pdf
optmizationtechniques.pdf
 
bv_cvxslides (1).pdf
bv_cvxslides (1).pdfbv_cvxslides (1).pdf
bv_cvxslides (1).pdf
 
www.ijerd.com
www.ijerd.comwww.ijerd.com
www.ijerd.com
 
7_Intro_to_Functions
7_Intro_to_Functions7_Intro_to_Functions
7_Intro_to_Functions
 

Kürzlich hochgeladen

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Kürzlich hochgeladen (20)

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

The Octagon Abstract Domain

  • 1. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion The Octagon Domain Bernhard Mallinger March 6-7th, 2013 Bernhard Mallinger The Octagon Domain
  • 2. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Outline 1 Domains 2 The Octagon Domain 3 Abstract Transfer Functions 4 Analysis Example 5 Conclusion Bernhard Mallinger The Octagon Domain
  • 3. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Outline 1 Domains 2 The Octagon Domain 3 Abstract Transfer Functions 4 Analysis Example 5 Conclusion Bernhard Mallinger The Octagon Domain
  • 4. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Recap: Abstract Domains Models states/properties in abstract interpretation of programs Manipulated by abstract transfer functions Can be composed of different kinds of elements Properties (e.g. sign, is even) Numeric values, intervals Relations Examples Sign Domain Interval Domain Polyhedra Domain Bernhard Mallinger The Octagon Domain
  • 5. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Numerical Domains I Figure: • represent elements of the domain, spurious elements are marked by ×. Domains always overapproximate in order to be sound. (figure from Miné (2006)) Bernhard Mallinger The Octagon Domain
  • 6. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Numerical Domains II Assumption: Numeric means R Interval Domain: Xi ∈ [ai , bi ] Polyhedra Domain: i aij Xi ≤ bj Zone Abstract Domain: ±Xi ≤ ci , Xi − Xj ≤ cij ∀i = j Octagon Domain: ±Xi ± Xj ≤ cij ∀i, j Bernhard Mallinger The Octagon Domain
  • 7. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Numerical Domains II Assumption: Numeric means R Interval Domain: Xi ∈ [ai , bi ] Polyhedra Domain: i aij Xi ≤ bj Zone Abstract Domain: ±Xi ≤ ci , Xi − Xj ≤ cij ∀i = j Octagon Domain: ±Xi ± Xj ≤ cij ∀i, j Bernhard Mallinger The Octagon Domain
  • 8. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Numerical Domains II Assumption: Numeric means R Interval Domain: Xi ∈ [ai , bi ] Polyhedra Domain: i aij Xi ≤ bj Zone Abstract Domain: ±Xi ≤ ci , Xi − Xj ≤ cij ∀i = j Octagon Domain: ±Xi ± Xj ≤ cij ∀i, j Bernhard Mallinger The Octagon Domain
  • 9. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Numerical Domains II Assumption: Numeric means R Interval Domain: Xi ∈ [ai , bi ] Polyhedra Domain: i aij Xi ≤ bj Zone Abstract Domain: ±Xi ≤ ci , Xi − Xj ≤ cij ∀i = j Octagon Domain: ±Xi ± Xj ≤ cij ∀i, j Bernhard Mallinger The Octagon Domain
  • 10. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Numerical Domains III In terms of precision: Interval < Octagon < Polyhedra Interval Domain is non-relational Polyhedra Domain has theoretically unbounded cost (exponentially in practise) Octagon domain limited to two variables per inequality and no coefficients ⇒ Quadratic memory/cubic time cost Bernhard Mallinger The Octagon Domain
  • 11. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Motivation: Relational Domains Not only properties of variables are of interest, but also the relation among them: 1 Y := X; 2 Z := X - Y; 3 Z := 4/Z; Bernhard Mallinger The Octagon Domain
  • 12. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Outline 1 Domains 2 The Octagon Domain 3 Abstract Transfer Functions 4 Analysis Example 5 Conclusion Bernhard Mallinger The Octagon Domain
  • 13. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Representation: Difference bound matrices I Constraints: ±X ± Y ≤ c ⇒ 2n × 2n matrix m Concretisation function γ: def γ (m) = {(v1 , . . . , vn ) ∈ Rn | ∀i, j : vj − vi ≤ mij } def γ(m) = {(v1 , . . . , vn ) ∈ Rn | (v1 , −v1 , . . . , vn , −vn ) ∈ γ (m)} Bernhard Mallinger The Octagon Domain
  • 14. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Representation: Difference bound matrices I Constraints: ±X ± Y ≤ c ⇒ 2n × 2n matrix m Concretisation function γ: def γ (m) = {(v1 , . . . , vn ) ∈ Rn | ∀i, j : vj − vi ≤ mij } def γ(m) = {(v1 , . . . , vn ) ∈ Rn | (v1 , −v1 , . . . , vn , −vn ) ∈ γ (m)} Bernhard Mallinger The Octagon Domain
  • 15. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Representation: Difference bound matrices I Constraints: ±X ± Y ≤ c ⇒ 2n × 2n matrix m Concretisation function γ: def γ (m) = {(v1 , . . . , vn ) ∈ Rn | ∀i, j : vj − vi ≤ mij } def γ(m) = {(v1 , . . . , vn ) ∈ Rn | (v1 , −v1 , . . . , vn , −vn ) ∈ γ (m)} Bernhard Mallinger The Octagon Domain
  • 16. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Figure: Octagon representation (figure from Miné (2006)) Bernhard Mallinger The Octagon Domain
  • 17. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Representation: Difference bound matrices II Abstraction function α: Given concrete values, α computes all entries of m by taking the maximal differences for each pair of variables A lattice can be defined: def m n ⇐⇒ ∀i, j : mij ≤ nij def (m n)ij = max(mij , nij ) def (m n)ij = min(mij , nij ) m n ⇒ γ(m) ⊆ γ(n) (γ, α) form a Galois connection Bernhard Mallinger The Octagon Domain
  • 18. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Figure: Problem: Representation is not unique (figure from Miné (2006)) Bernhard Mallinger The Octagon Domain
  • 19. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Shortest Path Closure Calculating all-pairs shortest paths yield smallest (closed) m∗ m∗ = inf {n | γ(m) = γ(n)} All bounds are as tight as possible (Saturation) Cubic time complexity (e.g. Floyd-Warshall) Negative cost cycle in m ⇐⇒ γ(m) = ∅ Bernhard Mallinger The Octagon Domain
  • 20. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Outline 1 Domains 2 The Octagon Domain 3 Abstract Transfer Functions 4 Analysis Example 5 Conclusion Bernhard Mallinger The Octagon Domain
  • 21. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Abstract Transfer Functions Abstract transfer functions correspond to semantic operations Must be sound, therefore overapproximation Some require closed arguments, some return closed ones Different kinds: Set operations such as Union/Intersection Assignment Test Widening/Narrowing Conversions to other domains (e.g. Interval, Polyhedra) Bernhard Mallinger The Octagon Domain
  • 22. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Union Take largest bounds elementwise: def m∪n = m n Union of two octagons isn’t an octagon in general ⇒ exact abstractions isn’t possible, only best abstraction Best abstraction is obtained if m and n are closed Bernhard Mallinger The Octagon Domain
  • 23. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Intersection Definition similar to union, but result is always exact Bernhard Mallinger The Octagon Domain
  • 24. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Forget-Operator Figure: Non-deterministic behaviour can be modeled by “forgetting” constraints, but closure is necessary (figure from Miné (2006)) Bernhard Mallinger The Octagon Domain
  • 25. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Assignment I Handling of assignments depends on the type of the expression Directly handleable in the octagon domain: X ← ±[a, b] X ← ±Y ± [a, b] e.g. for X ← Y + [a, b], we get a ≤ X − Y ≤ b: +X − −Y ≤ b − X − +Y ≤ −a −Y − +X ≤ b + Y − −X ≤ −a Constraints for X w.r.t. other variables have to be discarded Bernhard Mallinger The Octagon Domain
  • 26. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Assignment II In case the expression is too complex: ⇒ Transform everything to Interval or Polyhedra domain and do assignment there If using the Interval domain, new constraints can be derived by computing bounds of ±expr ± Y Using the Polyhedra domain is applicable to linear expressions and costly, but yields a best abstraction Bernhard Mallinger The Octagon Domain
  • 27. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Test 1 X := [-100, 100] 2 if X ≥ 0 then 3 // X ∈ [0, 100] 4 end if All tests can be simplified to expr ≤ 0 Octagonally shaped tests can directly be applied (e.g. X + Y + [a, b] ≤ 0) More complex forms can be handled in the Interval or Polyhedra domain (cf. Assignment) Bernhard Mallinger The Octagon Domain
  • 28. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Outline 1 Domains 2 The Octagon Domain 3 Abstract Transfer Functions 4 Analysis Example 5 Conclusion Bernhard Mallinger The Octagon Domain
  • 29. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion 1 X := [-100, 100] 2 Y := X 3 if Y ≤ 0 then 4 1 Y := -Y 2 5 else 6 3 7 end if 8 4 9 if Y ≤ 69 then 5 10 end if 1 −100 ≤ X ≤ 0 ∧ −100 ≤ Y ≤ 0 ∧ X − Y = 0 ∧ −200 ≤ X + Y ≤ 0 2 −100 ≤ X ≤ 0 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ X + Y = 0 3 0 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ X − Y = 0 ∧ 0 ≤ X + Y ≤ 200 4 −100 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 200 5 −69 ≤ X ≤ 69 ∧ 0 ≤ Y ≤ 69 ∧ −138 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 138 Bernhard Mallinger The Octagon Domain
  • 30. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion 1 X := [-100, 100] 2 Y := X 3 if Y ≤ 0 then 4 1 Y := -Y 2 5 else 6 3 7 end if 8 4 9 if Y ≤ 69 then 5 10 end if 1 −100 ≤ X ≤ 0 ∧ −100 ≤ Y ≤ 0 ∧ X − Y = 0 ∧ −200 ≤ X + Y ≤ 0 2 −100 ≤ X ≤ 0 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ X + Y = 0 3 0 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ X − Y = 0 ∧ 0 ≤ X + Y ≤ 200 4 −100 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 200 5 −69 ≤ X ≤ 69 ∧ 0 ≤ Y ≤ 69 ∧ −138 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 138 Bernhard Mallinger The Octagon Domain
  • 31. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion 1 X := [-100, 100] 2 Y := X 3 if Y ≤ 0 then 4 1 Y := -Y 2 5 else 6 3 7 end if 8 4 9 if Y ≤ 69 then 5 10 end if 1 −100 ≤ X ≤ 0 ∧ −100 ≤ Y ≤ 0 ∧ X − Y = 0 ∧ −200 ≤ X + Y ≤ 0 2 −100 ≤ X ≤ 0 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ X + Y = 0 3 0 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ X − Y = 0 ∧ 0 ≤ X + Y ≤ 200 4 −100 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 200 5 −69 ≤ X ≤ 69 ∧ 0 ≤ Y ≤ 69 ∧ −138 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 138 Bernhard Mallinger The Octagon Domain
  • 32. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion 1 X := [-100, 100] 2 Y := X 3 if Y ≤ 0 then 4 1 Y := -Y 2 5 else 6 3 7 end if 8 4 9 if Y ≤ 69 then 5 10 end if 1 −100 ≤ X ≤ 0 ∧ −100 ≤ Y ≤ 0 ∧ X − Y = 0 ∧ −200 ≤ X + Y ≤ 0 2 −100 ≤ X ≤ 0 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ X + Y = 0 3 0 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ X − Y = 0 ∧ 0 ≤ X + Y ≤ 200 4 −100 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 200 5 −69 ≤ X ≤ 69 ∧ 0 ≤ Y ≤ 69 ∧ −138 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 138 Bernhard Mallinger The Octagon Domain
  • 33. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion 1 X := [-100, 100] 2 Y := X 3 if Y ≤ 0 then 4 1 Y := -Y 2 5 else 6 3 7 end if 8 4 9 if Y ≤ 69 then 5 10 end if 1 −100 ≤ X ≤ 0 ∧ −100 ≤ Y ≤ 0 ∧ X − Y = 0 ∧ −200 ≤ X + Y ≤ 0 2 −100 ≤ X ≤ 0 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ X + Y = 0 3 0 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ X − Y = 0 ∧ 0 ≤ X + Y ≤ 200 4 −100 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 200 5 −69 ≤ X ≤ 69 ∧ 0 ≤ Y ≤ 69 ∧ −138 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 138 Bernhard Mallinger The Octagon Domain
  • 34. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion 1 X := [-100, 100] 2 Y := X 3 if Y ≤ 0 then 4 1 Y := -Y 2 5 else 6 3 7 end if 8 4 9 if Y ≤ 69 then 5 10 end if 1 −100 ≤ X ≤ 0 ∧ −100 ≤ Y ≤ 0 ∧ X − Y = 0 ∧ −200 ≤ X + Y ≤ 0 2 −100 ≤ X ≤ 0 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ X + Y = 0 3 0 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ X − Y = 0 ∧ 0 ≤ X + Y ≤ 200 4 −100 ≤ X ≤ 100 ∧ 0 ≤ Y ≤ 100 ∧ −200 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 200 5 −69 ≤ X ≤ 69 ∧ 0 ≤ Y ≤ 69 ∧ −138 ≤ X − Y ≤ 0 ∧ 0 ≤ X + Y ≤ 138 Bernhard Mallinger The Octagon Domain
  • 35. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Outline 1 Domains 2 The Octagon Domain 3 Abstract Transfer Functions 4 Analysis Example 5 Conclusion Bernhard Mallinger The Octagon Domain
  • 36. Domains The Octagon Domain Abstract Transfer Functions Analysis Example Conclusion Conclusion The Octagon domain adds limited relational information to the Interval Domain As opposed to the Polyhedra domain (exponential worst case), its operations are still in P A normal form can be computed using Shortest Path Closure ⇒ necessary for emptiness testing and comparison Has been employed successfully in ASTRÉE to analyse a large C-program (airplane control software) Reduction of false alarms with reasonable overhead Only relevant relations are considered (“packs” of variables) Bernhard Mallinger The Octagon Domain