av3-animator-as-code
av3-animator-as-code copied to clipboard
[Enhancement] Allow taking arbitrary boolean expressions
From this limitation, conditions with nested OR cannot be expressed easily, such as:
- 🚫 (F && (G || H) && (J || K))
As I understand it, state transitions naturally follow/allow for Sum Of Products boolean expressions. (each transition contains a number of ANDs between different conditions, and then you can OR the result of each transition together). Since any boolean expression can be rewritten into a Sum Of Products (SOP) form, we should be able to take any expression, rewrite it in SOP form, then generate the transitions accordingly.
Finding a SOP expression given an arbitrary expression shouldn't be too difficult, i think. Finding the optimal SOP expression is likely out of scope.