Skip to content

GT attribute expressions with different data types #408

@maxkratz

Description

@maxkratz

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions