Search in sources :

Example 1 with SATProver

use of kodkod.engine.satlab.SATProver in project org.alloytools.alloy by AlloyTools.

the class Solver method unsat.

/**
 * Returns the result of solving an unsat formula.
 *
 * @param translation the translation
 * @param stats translation / solving stats
 * @return the result of solving an unsat formula.
 */
static Solution unsat(Translation.Whole translation, Statistics stats) {
    final SATSolver cnf = translation.cnf();
    final TranslationLog log = translation.log();
    if (cnf instanceof SATProver && log != null) {
        return Solution.unsatisfiable(stats, new ResolutionBasedProof((SATProver) cnf, log));
    } else {
        // can free memory
        final Solution sol = Solution.unsatisfiable(stats, null);
        cnf.free();
        return sol;
    }
}
Also used : SATSolver(kodkod.engine.satlab.SATSolver) TranslationLog(kodkod.engine.fol2sat.TranslationLog) SATProver(kodkod.engine.satlab.SATProver)

Aggregations

TranslationLog (kodkod.engine.fol2sat.TranslationLog)1 SATProver (kodkod.engine.satlab.SATProver)1 SATSolver (kodkod.engine.satlab.SATSolver)1