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

Inconsistent asserts and default annotation parameters #21

Open
dtebbs opened this issue Aug 11, 2021 · 2 comments
Open

Inconsistent asserts and default annotation parameters #21

dtebbs opened this issue Aug 11, 2021 · 2 comments
Assignees

Comments

@dtebbs
Copy link
Contributor

dtebbs commented Aug 11, 2021

Various places in the code (e.g. pb_variable_array) provide a default annotation_prefix parameter of "", but then assert if this is passed in. e.g. https://github.com/clearmatics/libsnark/blob/master/libsnark/gadgetlib1/pb_variable.tcc#L29.

@dtebbs
Copy link
Contributor Author

dtebbs commented Apr 21, 2022

At the same time as enforcing annotations everywhere, it makes sense to determine exactly what the DEBUG build flag does (AFAIK it makes further use of the annotations), and potentially factor out DEBUG to one or more LIBSNARK_... build variables which enable the extra functionality. (DEBUG is pretty ambiguous for this kind of thing).

@dtebbs
Copy link
Contributor Author

dtebbs commented Apr 25, 2022

Note that FMT (which is commonly used to create the annotation strings) is also controlled by DEBUG (i.e. is DEBUG is not set, FMT expands to a no-op, returning an empty string. Thus, in the current code, the check for non-empty strings can only be enabled when DEBUG is set, and FMT works as expected.

@dtebbs dtebbs self-assigned this Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant