DEUXIEME PARTIE APPROCHE THEMATIQUE DU VIEILLISSEMENT Rapport final – Vieillissement démographique et territoires en Nord-Pas de Calais à l'horizon 2025 1
Presentation of a fewnumerical abstract domains non-relational domains:intervals,congruences linear equalitydomains polyhedradomain(double description) weakly relational domains:zones,octagons
7/8
3
February
hSroctmonigsofnon-relationa
Shortcomings
2012
ldoma
of
Numerical Abstract
ins
non-relational
Domains
domains
AntoineMin´e
p.
3
/
78
rimeNu12trbslAcaeF302yraurb´ep.eMin
To prove that, e.g.Y≥ −128, we must be able to: representthe propertiesR=X−SandR≤ −D, combinethem to deduceS−X≥D, and thenY=S−D≥X.
Iterations in the interval domain (without widening): X•]0X•]1X•]2. . .X•]n Y= 0|Y| ≤144|Y| ≤ . .160 .|Y| ≤128 + 16n In fact,Y∈[−128,128]always holds.
X: input signal Y: output signal S output: last R: deltaY-S D for allowed: max.|R|
4/78moiacaDtotnisnnA
Y:=0; while•true do X:=[-128,128]; D:=[0,16]; S:=Y; Y:=X; R:=X-S; if R<=-D then Y:=S-D fi; if R>=D then Y:=S+D fi done
To prove some invariant after theend of a loop, we often need to find aloopinvariant of amore complex form.
p.5/
To find thisioatlnanonler-invariant, we must find arelationalloop invariant at•:(−I<X<I)∧(X+I≡1 [2])∧(I∈[1,5000]), and apply the loop exit condition C]JI>=5000K.
relational loop invariant
X:=0; I:=1; while•I<5000 do if ? then X:=X+1 else X:=X-1 fi; I:=I+1 done
A non-relational analysis finds atthatI= 5000 andX∈Z.
The best invariant is: (I= 5000)∧(X∈[−4999,4999])∧(X≡0 [2]).