-
Notifications
You must be signed in to change notification settings - Fork 27
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
ACE processing deadlocks on empty string for input #155
Comments
Other findings for transfer/generation:
I think for |
Maybe raising an exception is too much, as it could be a situation that occurs with normal input files (that is, blank lines). Instead, mocking a response with the appropriate NOTE and SKIP lines could be less disruptive and still useful. |
Maybe, now that your PhD is over, it may be time to look at a direct python
to c interface, to avoid these kinds of problems.
|
Yes, it's something I've wanted to do for a while, but there are several things holding me back:
Maintaining this stdin/stdout interface already takes a bit of time, so (2) maybe isn't the strongest argument. |
Why is Python the only alternative? ;-) Lua, http://www.lua.org, has a much better integration with C. |
@arademaker Python isn't really the problem. I've done some work in Cython and I think it would be straightforward to create C bindings that way. The problem is that ACE is not engineered to be driven through bindings, so much of the effort would be spent refitting ACE for such usage. And I would be happy to see a LuaDelphin. Having multiple implementations strengthens our formalisms and frameworks. |
If an input file to ACE has an empty string (e.g., if the last line in a file is terminated with a newline), then PyDelphin deadlocks waiting for a certain line of output from ACE. This is what ACE would say:
The
NOTE
line is on stderr, and only occurs for actual blank input. Compare this to another SKIP message for non-empty input:Generation and Transfer, however, do not return anything, so this will need to be detected prior to sending (the same could be done for parsing, too). Maybe just fabricating a SKIP message for the response is the way to go.
More troubling is how generation and transfer don't return anything for non-MRS input. It seems to wait until a full MRS has been read (e.g., entering
[\n
doesn't do anything, but then]\n
causes it to say there are 0 results). Perhaps PyDelphin needs to validate that the input for generation and transfer are actual MRSs and only send those that are.The text was updated successfully, but these errors were encountered: