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

Hint function enhancements #253

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Hint function enhancements #253

wants to merge 8 commits into from

Conversation

katat
Copy link
Collaborator

@katat katat commented Jan 4, 2025

  • Evaluate constant values from IR terms in order to synthesize for forloop range, repeated array etc.
  • Support logging in hint functions. (Might need to be refactor to merge the existing logging logic into the same places and format.)
  • Support constant folding using hint function in mast phase, so complex calculations can be applied to constant values and used to instantiate functions.
  • Added builtin operators in hint functions: /(division), **(power), <<(left shift), %(modulus)
  • Allow expressions in ifelse block. (for constraint mode as well)
  • Print out warning instead of throwing error if the witness value is of HintIR type. This is because the evaluated hint value is used as a constant to instantiate a generic function instead of directly being a variable on the circuit.

@katat katat changed the title evaluate constant values in hint function Hint function enhancements Jan 4, 2025
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

Successfully merging this pull request may close these issues.

1 participant