-
Notifications
You must be signed in to change notification settings - Fork 25
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
recursion error on imported models #163
Comments
One part of the issue is that an expression tree gets constructed that contains a cycle (so it is not really a tree). This can lead to lots of issues, the one exhibited here is just printing the expression. Digging deeper... |
Can you please attach the model that was pickled? I.e., how input.zip was generated. |
This could be tricky, since I modify an already imported file and once modified It crashes as soon as I touch it. The best I can do is upload the way I found the bug. edits: spelling + I created the zip manually since I can't upload pickle file to GitHub |
Thanks for the files! Here is what I get now on b60310d:
Which is consistent with what you describe. Looking into get_variables.py now... |
Allright, think I got to the root of the issue. In attachment you find an adjusted metamorphic.py: The root cause are the mutations in the algorithm used to generate fuzzing tests, which may introduce cycles in the expression tree. CPMpy expects expression trees to be acyclic (i.e., they must be trees), an infinite recursion error will happen if they are not. E.g., printing an expression requests to print the arguments of the expression, these print their arguments in turn, etc. But if one of these subarguments was the original expression, we the recursion never finishes. When running the adjusted metamorphic.py, we get the following output:
In essence, Then |
So, right now, I think the issue is not in CPMpy, but in the mutations used to generate fuzzing tests. I'm not certain what the best fix would be (as these mutations are definitely proving their usefulness!). Maybe check that |
@rubenkindt If you agree with the above, then I'll close the issue. In any case, thanks for taking the time to report! |
CPMpy: version v0.9.9 commit e79b3af
Importing this file works but doing anything with the imported model causes a recursion error.
input.zip
expected behavior:
Print the model.
Bug found while working on my master thesis.
The text was updated successfully, but these errors were encountered: