Skip to content

Commit

Permalink
removing the name function
Browse files Browse the repository at this point in the history
  • Loading branch information
Soleimani193 committed Oct 22, 2024
1 parent 1647b69 commit 489f52e
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 27 deletions.
5 changes: 0 additions & 5 deletions prover/symbolic/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ type Constant struct {
Val field.Element
}

// Name returns the name for the Constant [Operator].
func (Constant) Name() string {
return "Constant"
}

// Degree implements the [Operator] interface
func (Constant) Degree([]int) int {
panic("we never call it for a constant")
Expand Down
2 changes: 0 additions & 2 deletions prover/symbolic/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ type Operator interface {
Degree([]int) int
// GnarkEval returns an evaluation of the operator in a gnark circuit.
GnarkEval(frontend.API, []frontend.Variable) frontend.Variable
// Name of the operator, used for debugging.
Name() string
}

// Board pins down the expression into an ExpressionBoard. This converts the
Expand Down
5 changes: 0 additions & 5 deletions prover/symbolic/lincomb.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ func NewLinComb(items []*Expression, coeffs []int) *Expression {
return e
}

// Name outputs the name for the LinComb [Operator]
func (LinComb) Name() string {
return "LinComb"
}

// Degree implements the [Operator] interface and returns the maximum degree of
// the underlying expression.
func (LinComb) Degree(inputDegrees []int) int {
Expand Down
5 changes: 0 additions & 5 deletions prover/symbolic/polyeval.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ func NewPolyEval(x *Expression, coeffs []*Expression) *Expression {
}
}

// Name outputs the name for the PolyEval [Operator].
func (PolyEval) Name() string {
return "PolyEval"
}

/*
Returns the degree of the operation given, as input, the degree of the children
*/
Expand Down
5 changes: 0 additions & 5 deletions prover/symbolic/product.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ func NewProduct(items []*Expression, exponents []int) *Expression {
return e
}

// Name outputs the name for the Product [Operator]
func (Product) Name() string {
return "Product"
}

// Degree implements the [Operator] interface and returns the sum of the degree
// of all the operands weighted by the exponents.
func (prod Product) Degree(inputDegrees []int) int {
Expand Down
5 changes: 0 additions & 5 deletions prover/symbolic/variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ type Variable struct {
Metadata Metadata
}

// Name outputs the name for the Variable [Operator].
func (Variable) Name() string {
return "Variable"
}

// Degree implements the [Operator] interface. Yet, this panics if this is called.
func (Variable) Degree([]int) int {
panic("we never call it for a variable")
Expand Down

0 comments on commit 489f52e

Please sign in to comment.