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

Consider introducing reassignedInputs section of an Instruction's inouts #492

Open
saelo opened this issue Jan 3, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@saelo
Copy link
Collaborator

saelo commented Jan 3, 2025

A FuzzIL instruction contains a list of inputs and outputs: the inouts array. Currently, the list if divided into three segments: inputs, outputs, and innerOutputs (outputs visible in a newly created scope). Outputs must be new variables, but we support reassigning existing variables (for example with the Reassign operation but also others). This works simply by passing them as inputs, and so reassigned inputs and read-only inputs are not easily distinguished. For that reason, we currently need some extra function to tell us if an input is reassigned.

I think instead of this, it could be much nicer and more robust if we added a new section to the inouts: reassignedInputs. That makes it immediately clear that these must be existing variables and that they will be reassigned. To ease the transition, we probably first want to rename .inputs to .allInputs and switch all callsites to that, then introduce .reassignedInputs and .inputs (or even .readOnlyInputs to make the distinction even more clear) and use them where appropriate.

@saelo saelo added the enhancement New feature or request label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant