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

GT attribute expressions with different data types #408

Open
maxkratz opened this issue Jul 16, 2021 · 0 comments
Open

GT attribute expressions with different data types #408

maxkratz opened this issue Jul 16, 2021 · 0 comments

Comments

@maxkratz
Copy link
Member

Currently, it is not possible to either:

  • compare, e.g., an ELong variable with an EInt
  • compare said ELong variable with an ELong constant.

In my example, substrateNode.residualCpu is an ELong and I want to check if it is greater than 0:
Screenshot_2021-07-16_12-09-42

Possible feature requests:

  1. Implement a language feature to express (E)Longs in GT rules/patterns, e.g.: # substrateNode.residualCpu > 0l
  2. Implement a feature for the backend, that compatible data types can be "casted" automatically. This would allow comparing, e.g., ELongs with EInts: # substrateNode.residualCpu > 0

IMO is 2. the preferred solution as this is how it is handled in Java.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant