I have almost completed my GSoC proposal on extending the propositional knowledge base and creating a new module for first order logic. However there are a couple of doubts that I would like to clear before putting up the proposal online.
Thanks in advance for the help.
I have almost completed my GSoC proposal on extending the propositional knowledge base and creating a new module for first order logic. However there are a couple of doubts that I would like to clear before putting up the proposal online.
- Will first order logic be integrated with its propositional counterpart or exist independently? Going for integration will make the code messy as appropriate checks will have to be made at EVERY point. On the other hand, independent existence will introduce a good amount of redundancy.
- Many concepts from first order logic are implemented in the assumption system (for e.g. predicates). However these implementations seem (I am not sure if they are) to be quite specific in nature. Should I try to make changes to the pre-existing code and build the rest of the codebase around it? Right now my proposal involves building a generic first order logic module from scratch. Additionally, once the logic module is mature enough to handle the requirements of the assumption system, would the new assumption use the new sympy.logic or continue to use the code in sympy.core / sympy.assumptions (which seems to fulfill the need except for efficiency parameters).
- One of my ideas is to create a faster SAT solver. Picosat and minisat appear to be good candidates. As suggested by @asmeurer we could always use something on the lines of pycosat (without making it a hard dependency) but the native solver should still be as fast as possible. Currently I am inclined towards implementing minisat (as pycosat can be used for picosat). Some suggestion for an appropriate solver would be helpful. Is it mandatory for me to declare the solver I am going to use in my proposal? I believe this decision can only be taken after actual implementation and thorough benchmarking.
- Considering that the assumption system is supposed to use the logic module heavily, some indication about the functions required (by the assumption system from the logic module) would be an enormous help.
It feels a bit like a laundry list. I realize that you don't really
know what is priority. I would rather focus the proposal. Some
thoughts on focus areas (depending on what interests you):
- Implementation of first-order logic. If you want, you could focus on
monadic calculus (only one variable), which is more decidable than
full first-order logic. Take a look at what Maple and Mathematica have
implemented to get an idea of what is possible, and also what sort of
syntax to use.
I think a lot of what makes your proposal feel like a laundry list is
that some of your ideas are a single pull request, and some could be a
whole summer. For example, changing the printing of the logic
functions is easy; improving the SAT solver with ideas from minisat is
not. But both take up the same amount of space in your proposal. For
the ideas that are actual implementations of algorithms, you should
spend some time discussing their implementation, not just what they
are.
I'm not sure I follow you here. Can you give a short example to show
what you mean in each case (integrated or not integrated)?
As I noted on your proposal in Melange, what does "implementing
MiniSAT" mean? Do you intend to write Python bindings for MiniSAT (if
so, you should demonstrate to us that you know C++, and the Python C
API)?
Or do you really mean, "improve the DPLL algorithm", which is already
in SymPy? There are some ideas for this at
https://groups.google.com/forum/#!searchin/sympy/muise%7Csort:date/sympy/Cb_uhh3MuE4/k-hSQnxpyv4J
(the posts by Christian Muise in particular).
Well, no one wants to say "I'll be the mentor" for exactly that
reason, because then they'll get bugged more often :)