stevia icon indicating copy to clipboard operation
stevia copied to clipboard

Add Nand, Nor and Xnor

Open Robbepop opened this issue 7 years ago • 1 comments

Stevia could profit by implementing or at least providing Nand, Nor and Xnor in addition to And, Or and Xor that currently exist. This could make some simplifications involving negation simpler or at least more performant temporarily.

These additional expression types could be implemented on several different layers.

  1. Factory-layer: Only provided by the expression build interface that internally directly forwards to And, Or and Xor. The downside is that this is quite intransparent to users that might be confused why no actual negated versions are created.
  2. In the expression AST. The advantage is that it is transparent, the downside is that it is a lot of repetition and requires another set of simplification rules for them. They could be simply directly reduced to their non-negated counterparts upon simplification without other simplifications occuring.

Robbepop avatar May 10 '18 21:05 Robbepop

Question: Do we actually need those?

Robbepop avatar Mar 11 '19 00:03 Robbepop