Expand description

Constraint circuits are a way to represent constraint polynomials in a way that is amenable to optimizations. The constraint circuit is a directed acyclic graph (DAG) of CircuitExpressions, where each CircuitExpression is a node in the graph. The edges of the graph are labeled with BinOps. The leafs of the graph are the inputs to the constraint polynomial, and the (multiple) roots of the graph are the outputs of all the constraint polynomials, with each root corresponding to a different constraint polynomial. Because the graph has multiple roots, it is called a “multitree.”

Structs

  • A wrapper around a CircuitExpression that manages additional bookkeeping information.
  • Helper struct to construct new leaf nodes in the multicircuit. Ensures that each newly created node gets a unique ID.
  • Constraint expressions, with context needed to ensure that two equal nodes are not added to the multicircuit.

Enums

  • A circuit expression is a recursive data structure. It is a directed, acyclic graph of binary operations on the input variables. It has multiple roots, making it a “multitree.”