-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add parser and model builder for JANI format #30
Conversation
Signed-off-by: keb77 <[email protected]>
Thank you for your PR! I will review it in detail, but, for a start, could you make sure the code is formatted using |
Signed-off-by: keb77 <[email protected]>
@EnricoGhiorzi I formatted the code and pushed the changes. Thank you! |
Signed-off-by: Enrico Ghiorzi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good but I would like to have some automated tests. I will add a test.rs
file that does that but the two examples we can run do not terminate. Why do you think that is the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I managed to run this test: parse the jani file, build the channel system, and run random actions on it. I would expect the channel system to terminate (meaning to get to a state in which no more transitions are possible), instead it seems to run forever. Do you have any idea why? Same applies for test.jani
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the problem is caused by the issue we discussed during our last meeting regarding how global variables are handled: in a program graph where a transition has a guard containing global variables, the system continuously checks for updates to those variables (which is done through other transitions). This should be why test.jani
doesn't terminate. test2.jani
, on the other hand, is structured in a way that should terminate, but it probably gets caught in a loop for similar reasons because the test function always chooses the first element in the possible transitions list. I modified the test function to select random transitions instead and it terminates as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your last commit has no sign-off and it fails the automated test. Could you fix that?
Also, would it be possible to modify test.jani
so that it eventually terminates too? That would make a good automated test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All done!
Signed-off-by: keb77 <[email protected]>
Signed-off-by: Federico Solinas <[email protected]>
Signed-off-by: Federico Solinas <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me!
No description provided.