Skip to content

Hint function enhancements#253

Open
katat wants to merge 11 commits into
mainfrom
feat/ir-enhancements
Open

Hint function enhancements#253
katat wants to merge 11 commits into
mainfrom
feat/ir-enhancements

Conversation

@katat
Copy link
Copy Markdown
Contributor

@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
@katat katat force-pushed the feat/ir-enhancements branch from 900c14e to 884877e Compare January 22, 2025 08:11
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.

2 participants