Skip to content

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

@saelo

Description

@saelo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions