Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsatisfied constraint feedback #515

Closed
joss-aztec opened this issue Nov 22, 2022 · 1 comment
Closed

Unsatisfied constraint feedback #515

joss-aztec opened this issue Nov 22, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@joss-aztec
Copy link
Contributor

Problem

Presently when testing or debugging a complex circuit it is difficult to identify which constraints weren't satisfied for a given input. Working around this is cumbersome, and can involve commenting out large parts of the circuit to isolate the failed constraint.

This is the current feedback provided for a failed proof:

could not satisfy all constraints

Solution

Provide semantics for annotating constraints akin to an assert or require statement. The associated message should then be listed when proving fails. E.g.

require(x < 5, "x is too high");
could not satisfy all constraints:
  - x is too high

Alternatives considered

A simpler compromise would be to provide line numbers for the failed constraints. Note however this would insufficient when authoring failure case unit tests, which would want to test for a specific failure message.

@joss-aztec joss-aztec added the enhancement New feature or request label Nov 22, 2022
@kevaundray
Copy link
Contributor

Partially resolved by #1864, opened a separate issue for assert messages: #1939

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants