av3-animator-as-code icon indicating copy to clipboard operation
av3-animator-as-code copied to clipboard

[Enhancement] Allow taking arbitrary boolean expressions

Open kitlith opened this issue 4 years ago • 0 comments

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.

kitlith avatar Feb 28 '22 21:02 kitlith