• Keine Ergebnisse gefunden

Verifikation von C-Programmen Vorlesung 6 vom 04.12.2014: Abstract Interpretation

N/A
N/A
Protected

Academic year: 2022

Aktie "Verifikation von C-Programmen Vorlesung 6 vom 04.12.2014: Abstract Interpretation"

Copied!
8
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Verifikation von C-Programmen

Vorlesung 6 vom 04.12.2014: Abstract Interpretation

Christoph Lüth

Universität Bremen

Wintersemester 2014/15

(2)

Galois-Connections

Let L,M be lattices and

α:LM γ :ML

with α, γ monotone, thenhL, α, γ,Mi is a Galois connection if

γ.αwλl.l (1)

α.γ vλm.m (2)

(3)

Example of a Galois Connection

L=hP(Z),⊆i M =hInterval,vi γZI([a,b]) ={z ∈Z|azb}

αZI(Z) =

(Z =∅ [inf(Z),sup(Z)] otherwise

(4)

Constructing Galois Connections

Let hL, α, β,Mi be a Galois connection, andS be a set. Then (i) SL,SM are lattices with functions ordered pointwise:

f vg ←→ ∀s.f svg s

(ii) hS →L, α0, γ0,SMi is a Galois connection with α0(f) =α.f

γ0(g) =γ.g

(5)

Generalised Monotone Framework

A Generalised Monotone Frameworkis given by

I a latticeL=hL,vi

I a finite flowFLab×Lab

I a finite set of extremal labelsE vLab

I an extremal labelιLab

I mappingsf fromlab(F) toL×Land lab(E) toL This gives a set of constraints

A(l)wG{A.(l0)|(l0,l)∈F} tιlE (3)

(6)

Correctness

Let R be a correctness relation RV ×L, andhL, α, γ,Mi be a Galois connection, then we can construct a correctness relation SV ×M by

v S m←→v Rγ(m)

On the other hand, if B,M is a Generalised Monotone Framework, and hL, α, γ,Mi is a Galois connection, then a solution to the constraintsBv is a solution toAv.

This means: we can transfer the correctness problem from Lto M and solve it there.

(7)

An Example

The analysis SS is given by the latticeP(State),vand given a statement S:

I flow(S)

I extremal labels areE ={init(S)}

I the transfer functions (for Σ⊆State):

flSS(Σ) ={σ[x 7→ A[[a]]σ]|σ∈Σ} if [x:=a]l is inS

flSS(Σ) = Σ if [skip]l is inS

flSS(Σ) = Σ if [b]l is inS

Now use the Galois connection hP(State), αZI, γZI,Intervali to construct a monotone framework with hInterval,vi, with in particular

(8)

What’s Missing?

I Fixpoints: Widening and narrowing.

Referenzen

ÄHNLICHE DOKUMENTE

Ein oder mehr type-specifier void, char, short, int, long, double, float, signed, unsigned, struct-or-union-spec , enum-spec, typedef-name. Beliebig storage-class extern,

Externe Deklaration: extern char a[] Keine Konversion Definition: char a [10] Keine Konversion Funktionsparameter: f(char a[]) Konversion möglich In einem Ausdruck: x= a[3]

In C, the state is not symbolic: pointers refer to other locations, so we need a sophisticated state model. The state is ambient: all formulae occuring as

Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. Systematic design of program

Januar: Mundenheim, Maudach, Oggersheim, West und Nord; Dienstag,

Hardy X Wright , An Introduction to the Theory..

Only possible interactions of Lightest Supersymmetric Particle (LSP) with matter: elastic scattering or production of squarks or sleptons, since at each vertex there should be

durch Gluonselbstkopplung (Gluonen bilden “Strings”) Teilchen bilden sich entlang strings, wenn es energetisch. günstiger ist, potentielle Energie in