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.
A FuzzIL instruction contains a list of inputs and outputs: the
inoutsarray. 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 theReassignoperation 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.inputsto.allInputsand switch all callsites to that, then introduce.reassignedInputsand.inputs(or even.readOnlyInputsto make the distinction even more clear) and use them where appropriate.