CPMpy/cpmpy

turn simplify_bool into normalise.

Wout4 opened this issue · 1 comments

Wout4 commented

There is more normalisation we should do before flattening, the natural place for this is in simplify bool.
The most pressing example is canonicalisation, which would make flattening faster in some cases, will help with cse, and removes the need to do it later in the transformation chain.

I agree, we should make a format what we consider "normalized" expressions.
Two things which would make sense to me are:

  • Constraints taking a "collection" of arguments (alldiff, sum,...) should have their arguments sorted
  • Convert numpy constants into Python constants. This will massively simplify our solver interfaces as solvers often do not accept numpy input