Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package ExpanderCompilerCollection wraps the most commonly used compiler APIs and provides an entry point for compilation. This package simplifies the interaction with the compiler by exposing a unified API interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeserializeInputSolver ¶
func DeserializeInputSolver(buf []byte) *ir.InputSolver
DeserializeInputSolver takes a byte buffer and returns a pointer to an ir.InputSolver which represents a deserialized input solver.
func DeserializeLayeredCircuit ¶
func DeserializeLayeredCircuit(buf []byte) *layered.RootCircuit
DeserializeLayeredCircuit takes a byte buffer and returns a pointer to a layered.RootCircuit which represents a deserialized layered circuit.
func ProfilingCompile ¶
func ProfilingCompile(field *big.Int, circuit frontend.Circuit, opts ...frontend.CompileOption) error
ProfilingCompile compiles the given circuit with profiling enabled, outputting the cost of each line of code. It does not return a compilation result as it does not complete the actual compilation process. Profiling is useful for performance analysis and optimization. TODO: Add support for sub-circuit profiling.
Types ¶
type API ¶
API encapsulates the ExpanderCompilerCollection's frontend.API along with two new APIs added to facilitate direct invocation of ExpanderCompilerCollection.API within the codebase.
type CompileResult ¶
type CompileResult struct {
	// contains filtered or unexported fields
}
    CompileResult represents the result of a compilation process. It contains unexported fields and provides methods to retrieve various components like the intermediate representation (IR) of the circuit, the InputSolver, and the Layered Circuit.
func Compile ¶
func Compile(field *big.Int, circuit frontend.Circuit, opts ...frontend.CompileOption) (*CompileResult, error)
Compile is similar to gnark's frontend.Compile. It compiles the given circuit and returns a pointer to CompileResult along with any error encountered during the compilation process.
func (*CompileResult) GetCircuitIr ¶
func (c *CompileResult) GetCircuitIr() *ir.RootCircuit
GetCircuitIr returns the intermediate representation (IR) of the compiled circuit as *ir.RootCircuit.
func (*CompileResult) GetInputSolver ¶
func (c *CompileResult) GetInputSolver() *ir.InputSolver
GetLayeredCircuit returns the Layered Circuit component of the compilation result as *layered.RootCircuit.
func (*CompileResult) GetLayeredCircuit ¶
func (c *CompileResult) GetLayeredCircuit() *layered.RootCircuit
GetInputSolver returns the InputSolver component of the compilation result as *ir.InputSolver.
      
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| 
       Package builder provides an implementation based on the gnark frontend builder with the following modifications: - LinearExpression has been changed to allow for quadratic terms in the form of Expression. 
         | 
      Package builder provides an implementation based on the gnark frontend builder with the following modifications: - LinearExpression has been changed to allow for quadratic terms in the form of Expression. | 
| 
       examples
            module
           
          
         | 
      |
| 
       An expression supporting quadratic terms, implemented based on gnark `frontend/internal/expr`. 
         | 
      An expression supporting quadratic terms, implemented based on gnark `frontend/internal/expr`. | 
| 
       Package ir implements the internal representation (IR) and related functionalities for the GKR compiler. 
         | 
      Package ir implements the internal representation (IR) and related functionalities for the GKR compiler. | 
| 
       Package layered defines the structures and functions necessary for creating and manipulating layered circuits within the ExpanderCompilerCollection compiler. 
         | 
      Package layered defines the structures and functions necessary for creating and manipulating layered circuits within the ExpanderCompilerCollection compiler. | 
| 
       Package layering provides functionality to compile an IR of a circuit into a layered circuit. 
         | 
      Package layering provides functionality to compile an IR of a circuit into a layered circuit. | 
| 
       Poseidon hash function, written in the layered circuit. 
         | 
      Poseidon hash function, written in the layered circuit. | 
