Python xor clauses with inverted literals disallowed
Is this intentional? I can't find an analogue for that limitation in the C++ code, and this regex seems to suggest it's expected. Even this old blog post uses a negative.
That parser code is quite old, perhaps the ability to use false vars was an issue that was resolved later?
Hi,
It kind of is. You can edit the code, though, if you like, to count the negations, and change the RHS. Or you can just do it outside of the python module, and only add variables with RHS set to the value required. I'd accept a PR that fixes this of course! But I think it's not a big limitation, you just need to count the negations, and flip the RHS accordingly:
static char const* kwlist[] = {"xor_clause", "rhs", NULL};
Let me know if you are up for writing a PR,
Mate
Sure, I'll get started on a PR for that, thanks for the quick response!
Closing, waiting for the PR :)