Summary: | operator precedence is inconsistent with C++ | ||
---|---|---|---|
Product: | UPPAAL | Reporter: | Marius Mikučionis <marius> |
Component: | libutap | Assignee: | Alexandre David <adavid> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | unspecified | ||
Hardware: | PC | ||
OS: | All | ||
Architecture: | |||
Attachments: |
model for testing some operator precedence
queries for testing some operator precedence (both modeling and properties) |
Description
Marius Mikučionis
2010-03-26 10:11:30 CET
Created attachment 230 [details]
model for testing some operator precedence
model for testing some operator precedence
Created attachment 231 [details]
queries for testing some operator precedence (both modeling and properties)
Fixed precedence of "not", "and" and "or" on trunk in revision 4508. I suspect there will be more issues, in particular with pre-increment and post-increment (they are treated differently in C++), but I don't see any difference between them in the parser. Also cannot think of an example for now... The bitwise not "~" is possible but it creates a mess with ranges and how many bits are used to encode a particular variable, thus it is not going to be implemented. Better use bitwise xor with explicit number of bits. The fix looks reasonable :). We can have bit inversion but we would need to check that the range is compatible with the operation, basically lower == -(upper+1). |