Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

feat: Add Log Directive #61

Merged
merged 12 commits into from
Feb 4, 2023
Merged

feat: Add Log Directive #61

merged 12 commits into from
Feb 4, 2023

Conversation

vezenovm
Copy link
Contributor

Related issue(s)

Resolves log statement issue in noir-lang repo: noir-lang/noir#383

Description

This includes a Log directive and the logic in the PWG for solving it.

Summary of changes

I added a Log directive that takes a LogInfo enum. This enum can either be finalized string output or a vector of witnesses whose data has to be fetched when solving the circuit. I then added the logic for printing single values and arrays in the PWG. This logic follows similar logic from acir gen when we can construct a finalized output string.

Dependency additions / changes

(If applicable.)

Test additions / changes

(If applicable.)

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.

Additional context

(If applicable.)

@kevaundray kevaundray changed the title Log Directive feat : Add Log Directive Feb 3, 2023
@kevaundray kevaundray changed the title feat : Add Log Directive feat: Add Log Directive Feb 3, 2023
@kevaundray
Copy link
Contributor

Out of scope, but noting for reference: We won't be able to have the equivalent of templating just yet. ie format!(" x: {value}")

For that LogInfo would probably need to be Recurisvely defined. We can open up a future issue/PR for this

@kevaundray kevaundray merged commit e459ba4 into noir-lang:master Feb 4, 2023
TomAFrench added a commit to TomAFrench/acvm that referenced this pull request Feb 10, 2023
* master:
  feat: Update Arkworks' dependencies on `acir_field` (noir-lang#69)
  add tests for `from_hex` and `to_hex` (noir-lang#85)
  improve field formatting (noir-lang#84)
  chore(ci): Leverage reusable workflows (noir-lang#81)
  fix clippy (noir-lang#82)
  0.4.1 Release
  remove duplicated match statement for Directive::Log (noir-lang#79)
  0.4.0 Release
  update changelog
  feat(acvm): Directive for sorting networks (noir-lang#77)
  feat: Preprocess methods for ACVM interface  (noir-lang#71)
  expose acir_field through acir (noir-lang#75)
  chore(acvm): rename remaining references to gadget calls (noir-lang#76)
  feat: Add Log Directive (noir-lang#61)
  blackbox to black_box (noir-lang#72)
  feat(ci)!: add spellchecker (noir-lang#73)
TomAFrench added a commit that referenced this pull request Feb 10, 2023
* master:
  feat: Update Arkworks' dependencies on `acir_field` (#69)
  add tests for `from_hex` and `to_hex` (#85)
  improve field formatting (#84)
  chore(ci): Leverage reusable workflows (#81)
  fix clippy (#82)
  0.4.1 Release
  remove duplicated match statement for Directive::Log (#79)
  0.4.0 Release
  update changelog
  feat(acvm): Directive for sorting networks (#77)
  feat: Preprocess methods for ACVM interface  (#71)
  expose acir_field through acir (#75)
  chore(acvm): rename remaining references to gadget calls (#76)
  feat: Add Log Directive (#61)
  blackbox to black_box (#72)
  feat(ci)!: add spellchecker (#73)
TomAFrench added a commit that referenced this pull request Feb 10, 2023
* master:
  feat: Update Arkworks' dependencies on `acir_field` (#69)
  add tests for `from_hex` and `to_hex` (#85)
  improve field formatting (#84)
  chore(ci): Leverage reusable workflows (#81)
  fix clippy (#82)
  0.4.1 Release
  remove duplicated match statement for Directive::Log (#79)
  0.4.0 Release
  update changelog
  feat(acvm): Directive for sorting networks (#77)
  feat: Preprocess methods for ACVM interface  (#71)
  expose acir_field through acir (#75)
  chore(acvm): rename remaining references to gadget calls (#76)
  feat: Add Log Directive (#61)
  blackbox to black_box (#72)
  feat(ci)!: add spellchecker (#73)
TomAFrench added a commit that referenced this pull request Feb 10, 2023
* master:
  feat: Update Arkworks' dependencies on `acir_field` (#69)
  add tests for `from_hex` and `to_hex` (#85)
  improve field formatting (#84)
  chore(ci): Leverage reusable workflows (#81)
  fix clippy (#82)
  0.4.1 Release
  remove duplicated match statement for Directive::Log (#79)
  0.4.0 Release
  update changelog
  feat(acvm): Directive for sorting networks (#77)
  feat: Preprocess methods for ACVM interface  (#71)
  expose acir_field through acir (#75)
  chore(acvm): rename remaining references to gadget calls (#76)
  feat: Add Log Directive (#61)
  blackbox to black_box (#72)
  feat(ci)!: add spellchecker (#73)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants