AirScript documentation states the following constraints regarding selectors in match statements:
AirScript makes the following assumptions about selector expressions, which are not yet enforced by the language:
- All selector expressions are based on binary values. To enforce these, we must manually add constraints of the form x^2=x for all values involved in selector expressions.
- All selector expressions are mutually exclusive. That is, for a given set of inputs, only one of the selector expressions in an enf > match statement can evaluate to 1, and all other selectors must evaluate to 0. Note: it is OK if all selector expressions evaluate to 0.
We should enforce it in the language: following PRs #413 and #423, we should be able to enforce that selectors are composed of binary expressions, and we could try all possible evaluations of the truth table to check by bruteforce it holds.
If the requirements do not hold, we should fail the compilation with an error message.
Originally posted by @Leo-Besancon in #413 (comment)
AirScript documentation states the following constraints regarding selectors in match statements:
We should enforce it in the language: following PRs #413 and #423, we should be able to enforce that selectors are composed of binary expressions, and we could try all possible evaluations of the truth table to check by bruteforce it holds.
If the requirements do not hold, we should fail the compilation with an error message.
Originally posted by @Leo-Besancon in #413 (comment)