Skip to content

Add unary reduction expressions #84

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

Tcenova
Copy link
Contributor

@Tcenova Tcenova commented Sep 26, 2024

New Features

  • Add unary reduction expressions

@Paebbels
Copy link
Member

Please provide these new operators after class InverseExpression(UnaryExpression) and before class AbsoluteExpression(UnaryExpression): to keep unary operators close together.

I would prefer the operator names Unary***Expression instead of Reduction***Expression.

@Paebbels Paebbels added the enhancement New feature or request label Sep 26, 2024
@Tcenova
Copy link
Contributor Author

Tcenova commented Sep 26, 2024

Ill make those changes shortly. As for the naming, I matched the naming of the GHDL node types. Does it matter if they match?

https://github.com/ghdl/ghdl/blob/92a4fc97fb82dff2374c774c3fd6f47c6307e1c6/pyGHDL/libghdl/vhdl/nodes.py#L218-L223

I should have a PR for GHDL soon which uses these changes to add support for translating unary reduction operators in the DOM.

@Paebbels
Copy link
Member

The naming is independent from GHDL, but it could correlate. GHDL follows the naming of the VHDL standard, but to be honest, the VHDL standard doesn't follow the common naming as used in computer science.

Technically, there are unary, binary and ternary operators. When adding semantics to an operator, it can be an adding, multiplying, or "reducing" operator / operation.

The VHDL LRM uses at many places name for languages entities, that don't match how it's called everywhere else :).


Should I collect further potential changes for pyVHDLModel or should I create a new release, so you can reference it?

@Paebbels Paebbels mentioned this pull request Sep 26, 2024
@Tcenova Tcenova closed this Sep 26, 2024
@Tcenova Tcenova force-pushed the add-reduction-expressions branch from d1f8c46 to 7a63b07 Compare September 26, 2024 19:12
@Tcenova Tcenova reopened this Sep 26, 2024
@Tcenova
Copy link
Contributor Author

Tcenova commented Sep 26, 2024

I dont have any other planned things to push to this repo for now. If you could create a release, I can ensure the PR to GHDL updates the version required. Do you have a preference on which branch of GHDL I use as a base? I would assume I should use your updated-tests branch since it should work with the updates in this repo?

@Paebbels Paebbels merged commit 0386e61 into VHDL:dev Sep 26, 2024
2 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants