Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kustosz committed Jul 24, 2024
1 parent 6caf929 commit 915f74c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
7 changes: 0 additions & 7 deletions extractor/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (
// CircuitToLean(circuit abstractor.Circuit, field ecc.ID, namespace ...string) because the long term view
// is to add an optional parameter to support custom `set_option` directives in the header.
func CircuitToLeanWithName(circuit frontend.Circuit, field ecc.ID, namespace string) (out string, err error) {
//defer recoverError()

schema, err := getSchema(circuit)
if err != nil {
return "", err
Expand Down Expand Up @@ -57,8 +55,6 @@ func CircuitToLean(circuit frontend.Circuit, field ecc.ID) (string, error) {
// GadgetToLeanWithName exports a `gadget` to Lean over a `field` with `namespace`
// Same notes written for CircuitToLeanWithName apply to GadgetToLeanWithName and GadgetToLean
func GadgetToLeanWithName(gadget abstractor.GadgetDefinition, field ecc.ID, namespace string) (out string, err error) {
//defer recoverError()

api := CodeExtractor{
Code: []App{},
Gadgets: []ExGadget{},
Expand All @@ -80,7 +76,6 @@ func GadgetToLean(gadget abstractor.GadgetDefinition, field ecc.ID) (string, err

// ExtractCircuits is used to export a series of `circuits` to Lean over a `field` under `namespace`.
func ExtractCircuits(namespace string, field ecc.ID, circuits ...frontend.Circuit) (out string, err error) {
//defer recoverError()

api := CodeExtractor{
Code: []App{},
Expand Down Expand Up @@ -136,8 +131,6 @@ func ExtractCircuits(namespace string, field ecc.ID, circuits ...frontend.Circui

// ExtractGadgets is used to export a series of `gadgets` to Lean over a `field` under `namespace`.
func ExtractGadgets(namespace string, field ecc.ID, gadgets ...abstractor.GadgetDefinition) (out string, err error) {
//defer recoverError()

api := CodeExtractor{
Code: []App{},
Gadgets: []ExGadget{},
Expand Down
15 changes: 0 additions & 15 deletions extractor/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,6 @@ import (
"github.com/reilabs/gnark-lean-extractor/v2/abstractor"
)

// recoverError is used in the top level interface to prevent panic
// caused by any of the methods in the extractor from propagating
// When go is running in test mode, it prints the stack trace to aid
// debugging.
//func recoverError() (err error) {
// if recover() != nil {
// if flag.Lookup("test.v") != nil {
// stack := string(debug.Stack())
// fmt.Println(stack)
// }
// err = errors.New("Panic extracting circuit to Lean")
// }
// return nil
//}

// arrayToSlice returns a slice of elements identical to
// the input array `v`
func arrayToSlice(v reflect.Value) []frontend.Variable {
Expand Down

0 comments on commit 915f74c

Please sign in to comment.