Symbolic Execution and Path Conditions

Follow an integer program along both sides of a branch and use the accumulated constraints to decide which states are feasible.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. A symbolic value denotes a family of inputs
  2. Bounds and semantics govern coverage

A symbolic value denotes a family of inputs

Start an integer input as a symbol \(a\). If the program branches on \(a\ge0\), record that condition on one path and \(a<0\) on the other. A branch assigning \(x=a\) on the first path and \(x=-a\) on the second represents the absolute value over mathematical integers. To check that \(x\ge0\), conjoin each path condition with \(x<0\). Both conjunctions are unsatisfiable in that model.

Bounds and semantics govern coverage

Each independent branch can split the number of path states. Loops may require a bound on iterations, state subsumption or separate invariants. A result for mathematical integers does not automatically apply to a signed fixed-width minimum value. Path sensitivity discusses merging states to manage cost. SMT supplies the decision procedure for feasible path conditions in the chosen language.[1]

References

  1. Anders Møller and Michael I. Schwartzbach, Static Program Analysis ↩