-
Notifications
You must be signed in to change notification settings - Fork 35
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
Error exit code on success #82
Comments
You are right, Problog always seems to end with the code: 1, whether the source of the interpreted program is correct or flawed. Program with error :
Program without error :
The convention that a function should return 0 when its execution has been nominal has its origin in the C language. Indeed Problog seems to not respect this convention of behaviour. In fact even when I intentionally introduced a syntax error into the code of the program written in Problog, the behaviour of the Problog interpreter was correct because it detected and reported the presence of this error. |
The probability.main task returns an exit code (cf. change Robin to fix public issue #82) rather than a result. Some tests erroneously relied on it returning the result instead of exit code. This fix addresses that. A similar approach should be taken still for the other problog tasks!
Mainly bugfixes, but we also changed the Term's hashing method. If this proofs to be worse, we may reconsider switching back later. * Bugfix library/string.py::str2lst (public issue #84) * Bugfix return exit code instead of result - only for probability task atm (public issue #82) * Critical Bugfix in dSharp library (compiled CNF theory with too long clauses could yield wrong result) * Bugfix in pypl related to lists (private issue #16) * Minor improvements to LFI * Changed Term's hashing method
This should be fixed in version v2.2.3 for the probability task (relevant commit b719042). For the other tasks (mpe, sample, ...), it is still on the internal to do list. |
Instead of having the CLI script call |
Hi! I am getting an exit status code of 1 for sucess. Is this intended? I am running your example:
And just running:
The text was updated successfully, but these errors were encountered: