Menu

#1052 Wrong evaluation of ECC guarding conditions due to missing parantheses

1.7.x
closed-fixed
nobody
4DIAC-IDE
Bug
High
2015-11-01
2015-11-01
No

The exported guarding condition of an ECC transition needs an additional pair of parantheses to separate them from the event condition. Otherwise an OR operator in the transition condition like Event && Data1 || Data2 will result in that the transition is taken if Data2 is true, due to the operator priority in C/C++ (&& has a higher priority than ||), as the interpreted C/C++ result will be (Event && Data1) || Data2.

But for the user it would be more natural if the result would be Event && (Data1 || Data2) or in general Event && (all guarding conditions)

Cheers, Martin

Related

News: 2015/11/third-maintenance-release-for-4diac-17

Discussion

  • Zoitl Alois

    Zoitl Alois - 2015-11-01

    Thanks for reporting this. It is fixed in cst [fordiac-ide:566def]

     

    Related

    Commit: [566def]

  • Zoitl Alois

    Zoitl Alois - 2015-11-01
    • labels: ST, ECC, Guarding Condition --> ST, ECC, Guarding Condition, export
    • status: open --> closed-fixed
    • Group: FORTE --> 4DIAC-IDE
    • Milestone: Backlog --> 1.7.x
     

Log in to post a comment.