class MSSSolver: (source)
Code from:https://raw.githubusercontent.com/Z3Prover/z3/master/examples/python/mus/mss.py MIT licensed The following is a procedure for enumerating maximal satisfying subsets. It uses maximal resolution to eliminate cores from the state space. Whenever the hard constraints are satisfiable, it finds a model that satisfies the maximal number of soft constraints. During this process it collects the set of cores that are encountered. It then reduces the set of soft constraints using max-resolution in the style of [Narodytska & Bacchus, AAAI'14]. In other words, let F1, ..., F_k be a core among the soft constraints F1,...,F_n Replace F1,.., F_k by F1 or F2, F3 or (F2 & F1), F4 or (F3 & (F2 & F1)), ..., F_k or (F_{k-1} & (...)) Optionally, add the core ~F1 or ... or ~F_k to F The current model M satisfies the new set F, F1,...,F_{n-1} if the core is minimal. Whenever we modify the soft constraints by the core reduction any assignment to the reduced set satisfies a k-1 of the original soft constraints.
Method | __init__ |
Undocumented |
Method | add |
Undocumented |
Method | c |
Undocumented |
Method | enumerate |
Undocumented |
Method | grow |
Undocumented |
Method | relax |
Undocumented |
Method | resolve |
Undocumented |
Method | update |
Undocumented |
Instance Variable | idcache |
Undocumented |
Instance Variable | mcs |
Undocumented |
Instance Variable | mcs |
Undocumented |
Instance Variable | model |
Undocumented |
Instance Variable | mss |
Undocumented |
Instance Variable | n |
Undocumented |
Instance Variable | nmcs |
Undocumented |
Instance Variable | orig |
Undocumented |
Instance Variable | s |
Undocumented |
Instance Variable | soft |
Undocumented |
Instance Variable | soft |
Undocumented |
Instance Variable | unknown |
Undocumented |
Instance Variable | varcache |
Undocumented |