Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ref. #2237
Implements simple branching by cloning and setting a range constraint.
In order to make this work, we need the following:
We need to propagate constant values across identities, including completed ones and submachine calls. Concerning the former: Since we do not solve for known variables, we need to change the evaluation such that variables that are known but not concrete are turned into unknown variables. This should be easy by extracting the evaluator into a new component that has a flag how to deal with the variables.
For the lookups, we need to perform them in a way that they do not create a new multiplicity entry. Also we need an interface that either returns range constraints or concrete values. We might just do this for the fixed lookup for now, since we do not expect other machines to return range constraints for concrete inputs.
If we do not want to drive this from outside with another loop, we could also store the identities to consider inside witgen_inference. This would mean that they are cloned with a branch, but might not be too bad since the expressions are just references.