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

Mixing two operations in one statement #37

Open
nkrusch opened this issue Jun 11, 2021 · 1 comment
Open

Mixing two operations in one statement #37

nkrusch opened this issue Jun 11, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@nkrusch
Copy link
Member

nkrusch commented Jun 11, 2021

example3_4.c gives an error, probably because there I am mixing two operations in one statement.

Originally posted here

The analysis makes some assumptions about left and right operand structure:

https://github.com/seiller/pymwp/blob/51bc64cfd9b3638de20a2e2671535a4975c2549f/pymwp/analysis.py#L165-L173

which prevents using the original expression X3 = X2 * X2 + X5; Adding some recursive step in binary op might allow analyzing this expression in original form (depending on what the AST looks like for this statement, I have not looked into it)?

If this is not worth fixing at the moment then we can add a note in the features table that binary op is for two operands and support for multiple is in progress.

@aubertc
Copy link
Contributor

aubertc commented Jun 12, 2021

Yes, both X3 = X2 * X2 + X5; and X3 = X2 * (X2 + X5); are problematic right now.
Not a big deal, but it came as a surprise.

@nkrusch nkrusch added the enhancement New feature or request label Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants