Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Nand, Nor and Xnor #7

Open
Robbepop opened this issue May 10, 2018 · 1 comment
Open

Add Nand, Nor and Xnor #7

Robbepop opened this issue May 10, 2018 · 1 comment
Labels
A-ast Task operating on the stevia_ast crate in isolation. B-enhancement An enhancement or new feature. C-question A question. D-easy A task that is considered to be simple to implement.

Comments

@Robbepop
Copy link
Owner

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
Copy link
Owner Author

Question: Do we actually need those?

@Robbepop Robbepop added B-enhancement An enhancement or new feature. C-question A question. D-easy A task that is considered to be simple to implement. A-ast Task operating on the stevia_ast crate in isolation. labels Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ast Task operating on the stevia_ast crate in isolation. B-enhancement An enhancement or new feature. C-question A question. D-easy A task that is considered to be simple to implement.
Projects
None yet
Development

No branches or pull requests

1 participant