Problem: Track what values variables can take at each program point—but exact tracking is impossible.
Solution: Use intervals to over-approximate. Always contains all real values, maybe more.
Trade-off: Sound (no false negatives), but imprecise (may have false positives).


Interval Arithmetic

OperationRuleExample
Add
Subtract
Scalar (if )
Multiply of

Fundamental theorem: — computed interval always contains true range.


The Dependency Problem

Interval arithmetic forgets that the same variable appears twice.

Example: , compute .

  • Real answer: always
  • Interval: ← over-approximation!

Rule: if each variable appears once, result is exact.


Worked Example

x := [2,5]; 
y := x+3; 
z := 2*y;


Conditionals — analyse both branches, then join (union).

if (x>0) then y:=x else y:=-x with :

  • Then ():
  • Else ():
  • Join:

Loops & Widening — loops can grow intervals forever. Widening forces convergence by jumping bounds to after a few iterations. Guarantees termination, loses precision.


Summary — Possibly skip

WhatTrack ranges through program
WhyProve properties (no overflow, etc.)
CoreSound (over-approximates), may be imprecise
DependencySame var twice → precision loss
ConditionalsBoth branches → join
LoopsWidening → termination

Talking points

  • “Why over-approximate?” — Safety. May get false alarms, never miss real bugs.
  • “Downside?” — Precision loss (dependency problem, wide loops).
  • “Where used?” — Static analysers, compilers, safety-critical systems.