I managed to overcome the overhead in ask() that arises when converting
between symbol and integer representation of sentences in conjunctive
normal. The result went beyond what I expected. The test suite for the
query module got 10x times faster in my laptop. From 26 seconds, it
descended to an …
Today I've been doing some speed improvements for the logic module. More
precisely, I implemented an efficient internal representation for
clauses in conjunctive normal form. In practice this means a huge
performance boost for all problems that make use the function
satisfiable() or dpll_satisfiable(). For example, test_dimacs.py has
moved …
This commit introduced a new module in sympy: the refine module. The
purpose of this module is to simplify expressions when they are bound to
assumptions. For example, if you know that x>0, then you can simplify
abs(x) to x. This code was traditionally embedded into the core …
The query module is finally in the main SymPy repository. I made
substantial changes since last post, most of them at the user interface
level (thanks to Vinzent and Mateusz for many insightful comments). Main
function is ask(), which replaces the old expression.is_* syntax. You
can ask many things …
After some failed attempts, I just found how to change the language
settings dynamically in django, and I thought it could be useful to
someone. Just use function activate() from django.utils.translation. For
example: [cc lang="python"] from django.utils.translation import
activate activate('es-ES') [/cc] will change global …
Three months after I began to write sympy.queries, I feel it's about
time to include it in sympy's trunk, so today I sent for review 4
patches that implement the complete query module. It's been a lot of
fun, but it has also caused me some headaches ... specially last …
The 0.6.5 release of SymPy is taking longer than expected because some
bugs in the testing framework, so my query module is not merged into
trunk (yet). In the meantime, I am implementing a refine module (very
little code is available yet). The refine module implements a refine …
Last days I've been busy preparing the first public beta of SymPy
0.6.5. Most of the time was spent solving a bug that made
documentation tests fail under python2.4, but now that this is solved, I
hope that by the end of the week we could have …
Background: DPLL is the algorithm behind SymPy's implementation of
logic.inference.satisfiable After reading the original papers by Davis &
Putnam [1], I managed to implement a more efficient version of the DPLL
algorithm. It is 10x times faster on medium-sized problems (40
variables), and solves some wrong result bugs [2 …
After some hacking on the queries module, I finally got it right without
the limitations of past versions. You can check it out from my repo
http://fa.bianp.net/git/sympy.git, branch master. It now relies even more
on logic.inference.satisfiable(), which is just an implementation of …