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

PyRFLX: prev_field does not return correct predecessor field #289

Closed
rssen opened this issue Jun 16, 2020 · 0 comments · Fixed by #281
Closed

PyRFLX: prev_field does not return correct predecessor field #289

rssen opened this issue Jun 16, 2020 · 0 comments · Fixed by #281
Assignees
Labels
bug pyrflx Related to pyrflx package (Legacy Python API)

Comments

@rssen
Copy link
Contributor

rssen commented Jun 16, 2020

Suppose the following Spec:

type Message is
   message
      F1 : F1
         then F2
            if <condition>,
         then F3
            if <other condition>;
      F2 : F2
         then FCS;
      F3 : F3;
      FCS : FCS;
   end message;

The prev_field function is not able to correctly return the predecessor of FCS, because it only checks, whether the condition of an incoming edge can be evaluated to true. It than assumes that the source field of the edge is the predecessor of the given field. As edges form F2 and F3 to FCS both have the condition true, the field which is evaluated first is assumed to be the predecessor of FCS (but not necessarily the right one). The same applies for the _get_length_unchecked function.
To solve this, i would introduce a check, if the assumed predecessor field has been set.

@rssen rssen added the pyrflx Related to pyrflx package (Legacy Python API) label Jun 16, 2020
@rssen rssen self-assigned this Jun 16, 2020
@rssen rssen added the bug label Jun 16, 2020
@treiher treiher added this to To do in RecordFlux 0.4.1 via automation Jun 16, 2020
rssen added a commit that referenced this issue Jun 17, 2020
rssen added a commit that referenced this issue Jun 17, 2020
@treiher treiher moved this from To do to In progress in RecordFlux 0.4.1 Jun 17, 2020
RecordFlux 0.4.1 automation moved this from In progress to Done Jun 17, 2020
treiher pushed a commit that referenced this issue Jun 17, 2020
@treiher treiher mentioned this issue Jul 14, 2020
4 tasks
treiher pushed a commit that referenced this issue Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pyrflx Related to pyrflx package (Legacy Python API)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant