Interval Analysis and Loss of Correlation

Compute sound numeric bounds with interval transfer rules and identify exactly which relationships a box abstraction can lose.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. An interval encloses all values considered possible
  2. Two intervals cannot express equality between variables

An interval encloses all values considered possible

If \(x\in[2,5]\) and \(y\in[-1,4]\), integer addition produces values inside \([1,9]\). This enclosure is exact for independently varying operands over their allowed ranges. A test \(x\le3\) can intersect the true branch’s interval for \(x\) with \((-\infty,3]\). At a merge, interval hull keeps both possibilities, perhaps adding values in the gap.

Two intervals cannot express equality between variables

After assigning \(y:=x\) with \(x\in[0,5]\), both intervals are \([0,5]\). Subtracting them independently gives \([-5,5]\) even though the program always yields zero. The approximation is sound because it includes zero. Obtaining a precise result can need a relational domain or path-sensitive reasoning. Abstract interpretation formalizes how concrete states correspond to abstract enclosures.[1][2]

References

  1. Benjamin C. Pierce et al., Software Foundations ↩
  2. Anders Møller and Michael I. Schwartzbach, Static Program Analysis ↩