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

Retroactive: Define necesary Brillig opcodes #227

Closed
1 task done
Tracked by #297
kevaundray opened this issue Apr 24, 2023 · 2 comments
Closed
1 task done
Tracked by #297

Retroactive: Define necesary Brillig opcodes #227

kevaundray opened this issue Apr 24, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@kevaundray
Copy link
Contributor

Problem

As a part of #191 we need to define the opcodes needed for Brillig. The main requirement is for it to be simple.

There are some things to consider when defining the opcodes:

  • Brillig can have intrinsic functions (these are the blackbox functions defined in ACIR)
  • Brillig does not perform IO, but it is possible to stop execution of Brillig using an Oracle. The Oracle will stop execution and supply the caller with an Oracle name, inputs and ask the caller to fill in its output values.
  • Brillig is capable of doing arithmetic operations and the base type is a Field element. This is opposed to a 64-bit system whose base type is a uint64.
  • Brillig has a concept of memory, where each memory cell is also a Field Element.
  • Brillig is Turing complete and can have un/conditional jumps.

Proposed solution

Defining the opcodes and their rough structures is the first step. The hardest part here would be defining how memory is handled.

We should not need to concern ourselves with Noir, though it might make life easier if we eventually do something that is similar to the way the new ssa refactor is working in Noir.

Alternatives considered

No response

Additional context

No response

Submission Checklist

  • Once I hit submit, I will assign this issue to the Project Board with the appropriate tags.
@kevaundray kevaundray added the enhancement New feature or request label Apr 24, 2023
@kevaundray
Copy link
Contributor Author

Pinging @TomAFrench for visibility

@ludamad
Copy link
Contributor

ludamad commented May 30, 2023

Confirmed with Kev to be done

@ludamad ludamad closed this as completed May 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

3 participants