Skip to content

Add Nand, Nor and Xnor #7

@Robbepop

Description

@Robbepop

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-astTask operating on the stevia_ast crate in isolation.B-enhancementAn enhancement or new feature.C-questionA question.D-easyA task that is considered to be simple to implement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions