Algorithm Search⌘K

Verification, symbolic execution and synthesis

Problems

  • Loop invariant synthesis

    Find an inductive loop invariant strong enough to prove a program's specification. Undecidable in general, solved for restricted invariant shapes.

    core
  • Program synthesis

    Given a specification, such as a formula, examples or a type, find a program in a given language that meets it.

    core
  • Programming by example

    Find a program in a domain-specific language that is consistent with a few given input-output examples and generalizes well.

    core
  • Reactive synthesis

    Given a temporal logic specification over inputs and outputs, build a finite-state system whose outputs meet it for all input sequences.

    advanced
  • Automated program repair

    Given a program and tests some of which fail, find a small change to the program that makes all tests pass.

    research

Algorithms

  • Bottom-up enumerative synthesis

    Enumerates programs of growing size from smaller ones and keeps one program per distinct output vector on the examples.

    O(k b^2) binary rules only1 languagescore
  • Concolic testing

    Runs the program on concrete input while recording the symbolic path condition, then negates a branch and solves for input to a new path.

    O(R (T + m C)) worst1 languagescore
  • Coverage-guided greybox fuzzing

    Mutates inputs from a queue and keeps those that reach new code coverage, measured by lightweight instrumentation.

    O(N T + V (Q E + E log E)) worst1 languagescore
  • Delta debugging

    Shrinks a failing input to a 1-minimal failing one by testing subsets and complements of finer and finer partitions.

    O(N^2 (t + N)) worst1 languagescore
  • Verification condition generation

    Turns an annotated program into logical formulas, by weakest preconditions or symbolic paths, whose validity implies its correctness.

    O(2^n) worst1 languagescore
  • Generational search

    Expands each concolic run by negating every branch condition on its path at once, producing a generation of new inputs to test.

    O(R (T + m C + log R)) worst1 languagesadvanced
  • Gulwani's string transformation synthesis

    The FlashFill method. Build a DAG over output positions with all substring and constant atoms for each example, intersect the DAGs, and pick the best-ranked path.

    O(m^(2k) n^k p) worst case all examples1 languagesadvanced
  • Houdini

    Guesses many candidate invariants and removes those a verifier refutes until the rest are inductive, the largest such subset.

    O(c T + c^2) worst1 languagesadvanced
  • Constraint-based invariant generation

    Finds linear inductive invariants by writing an invariant template and solving the conditions it must meet with Farkas' lemma.

    O((|M| + 1)^k L) worst1 languagesresearch
  • Linear ranking function synthesis

    Decides whether a simple linear loop has a linear ranking function and finds one, by linear programming.

    O(m n + L) worst1 languagesresearch
  • Type-directed program synthesis

    Searches for a program top-down by the goal type, using examples or refinement types to prune each partial program early.

    O(w b^2) one bank1 languagesresearch

Data structures

  • Version space algebra

    A shared DAG of union and join nodes that stores all programs consistent with some examples, often exponentially many in polynomial space, with intersection and counting.

    O(s^2 d^2) expected build1 languagesadvanced

Techniques

  • Deductive program synthesis

    Extracts a program from a constructive proof that for every input there is an output meeting the specification.

    advanced
  • Grammar-based fuzzing

    Generates test inputs from a grammar of the input format, so that most inputs pass the parser and test deeper code.

    advanced
  • Program sketching

    The programmer writes a program with holes and the synthesizer fills the holes with constants or expressions so the assertions hold.

    advanced
  • Proof-carrying code

    Ships machine code with a formal proof that it meets a safety policy, which the host checks with a small fast proof checker.

    advanced
  • Translation validation

    Proves after each compilation that the output program refines the input one, instead of proving the compiler correct once.

    advanced
  • Equivalence modulo inputs

    Tests compilers by deleting code not run on a given input and checking that the compiled variants all give the same output.

    research
  • Self-composition

    Reduces a property of two runs, such as noninterference or equivalence, to a safety property of one program that runs both copies.

    research

Concepts

  • Path explosion

    The number of paths of a program grows exponentially with its branches and is unbounded with loops, which limits symbolic execution.

    core
  • Verified compilation

    A compiler with a machine-checked proof that the semantics of each compiled program refines the semantics of its source.

    advanced

Definitions

  • Path condition

    The conjunction of branch conditions over symbolic inputs that an execution path takes, satisfiable exactly by inputs that follow it.

    intro
  • Strongest postcondition

    The most precise condition that holds after a command runs from a state satisfying a given precondition, the forward dual of wp.

    core
  • Symbolic execution tree

    The tree of all paths of symbolic execution of a program, with a node per statement and a path condition per branch.

    core

Theorems

  • Pnueli-Rosner theorem

    Synthesis of a reactive system from an LTL specification is complete for doubly exponential time.

    research
  • Transition invariant theorem

    A program terminates iff its transition relation has a transition invariant that is a finite union of well-founded relations.

    research