「‍」 Lingenic

Symbolic Execution

(⤓.md ≡ ◇.md); γ ≜ [2026-07-17T135416.643, 2026-10-22T054143.488] ∧ |γ| = 3

Symbolic Execution

Origin. King (1976). Execute with symbolic values instead of concrete. Accumulate path conditions. Explore all paths systematically. Foundation for testing and verification.

Models. Variables hold symbolic expressions. Branches create path conditions. Constraint solving for feasibility. Path explosion main challenge.

Formalism.

Symbolic state: σ = (pc, ρ, π) where:

  • pc: program counter
  • ρ: symbolic store (var → symbolic expr)
  • π: path condition (boolean formula)

Symbolic expressions: e ::= c | x | e + e | e * e | ... Built from constants, symbols, operators.

Assignment: (pc, ρ, π) →[x := e] (pc', ρ[x ↦ ρ(e)], π)

Conditional: (pc, ρ, π) →[if(e)] (pc_t, ρ, π ∧ ρ(e)) if SAT(π ∧ ρ(e)) (pc_f, ρ, π ∧ ¬ρ(e)) if SAT(π ∧ ¬ρ(e)) Fork execution on both branches.

Assertion checking: assert(e): check SAT(π ∧ ¬ρ(e)) If SAT: assertion can fail. Model gives concrete counterexample.

Concolic execution: Concrete + symbolic together. Concrete guides exploration. Symbolic enables path deviation.

Path merging: Combine paths with disjunctive conditions. Reduces exploration, complicates constraints.

Symbols.

SymbolUnicodeNameMeaning
σU+03C3Sigma / Symbolic stateThe triple (pc, ρ, π)
ρU+03C1Rho / Symbolic storeMaps each variable to a symbolic expression
πU+03C0Pi / Path conditionConstraint accumulated along the path taken
pc—Program counterNext instruction of the symbolic state
e—Symbolic expressionTerm over constants, input symbols, and operators
↦U+21A6Rightwards arrow from bar / Store updateρ[x ↦ ρ(e)], rebinding one variable
→U+2192Rightwards arrow / Symbolic stepTransition between symbolic states
∧U+2227Logical andExtends the path condition with a branch guard
¬U+00ACNot signThe negated guard on the false branch
::=—Grammar productionDefines the symbolic expression language
SAT—SatisfiableThe path is feasible; a model is a concrete input
assert—AssertionChecked by testing SAT(π ∧ ¬ρ(e))

Metatheory. King's 1976 formulation has an exact characterization behind it: the path condition π describes precisely the set of inputs that drive execution down that path, so the paths partition the input space and each path's constraint is neither an over- nor an under-approximation. Two consequences follow. A model of π ∧ ¬ρ(e) at an assertion is a concrete failing input, so reported faults are true positives; and the disjunction of the path conditions of all terminating paths covers the terminating behaviour, so exhaustive exploration would be a decision procedure. Exhaustive exploration is what is unavailable: the number of paths is exponential in the number of branches and unbounded when a loop's trip count depends on input. Feasibility is delegated to a solver, so the method is complete only relative to the theory the program's operations generate — decidable for linear arithmetic and for bit-vectors, undecidable once nonlinear integer arithmetic appears, by Matiyasevich's 1970 solution of Hilbert's tenth problem. Concolic execution (DART, Godefroid, Klarlund, and Sen 2005; CUTE, Sen, Marinov, and Agha 2005) substitutes concrete values wherever symbolic reasoning stalls, restoring progress at the cost of the paths thereby pruned.

Applies to. KLEE, SAGE, Angr. Bug finding. Test generation. Malware analysis. Security testing.

Limitations. Path explosion is structural rather than incidental: n sequential two-way branches give 2ⁿ paths, and a loop whose trip count is an input has no finite set of paths at all, so every terminating search is a partial exploration and the absence of a reported fault carries no information. Feasibility is decided by the solver, so the technique inherits its boundaries exactly — nonlinear integer constraints are undecidable, and a constraint that inverts a cryptographic hash is satisfiable in principle and unreachable in practice. Symbolic reasoning stops at the edge of the modelled code: system calls, libraries, and hardware are either hand-modelled, in which case soundness is relative to that model, or concretized, which silently discards the paths the concrete value forecloses. Path merging trades the number of paths for the size of the constraint, and the disjunctive path conditions it produces are the shape solvers handle worst.

© 2026 Lingenic LLC