Package solver.explanations

Examples of solver.explanations.Explanation


    public synchronized Throwable fillInStackTrace() {
        return this;
    }

    public Explanation explain() {
        Explanation expl = new Explanation();
        if (v != null) {
            v.explain(VariableState.DOM, expl);
        } else {
            c.explain(null, expl);
        }
View Full Code Here


    }

    @Override
    public void onContradiction(ContradictionException cex) {
        assert (cex.v != null) || (cex.c != null) : this.getClass().getName() + ".onContradiction incoherent state";
        Explanation complete = mExplanationEngine.flatten(cex.explain());
        if (userE) {
            lastOne = complete;
        }
        if (Configuration.PRINT_EXPLANATION && LOGGER.isInfoEnabled()) {
            mExplanationEngine.onContradiction(cex, complete);
View Full Code Here

        Decision dec = mSolver.getSearchLoop().getLastDecision();
        while ((dec != RootDecision.ROOT) && (!dec.hasNext())) {
            dec = dec.getPrevious();
        }
        if (dec != RootDecision.ROOT) {
            Explanation explanation = new Explanation();
            Decision d = dec.getPrevious();
            while ((d != RootDecision.ROOT)) {
                if (d.hasNext()) {
                    explanation.add(d.getPositiveDeduction());
                }
                d = d.getPrevious();
            }
            mExplanationEngine.store(dec.getNegativeDeduction(), explanation);
        }
View Full Code Here

            solver.set(new RecorderExplanationEngine(solver));
            ConflictBasedBackjumping cbj = new ConflictBasedBackjumping(solver.getExplainer());
            cbj.activeUserExplanation(true);
//            SMF.shortlog(solver);
            Assert.assertFalse(solver.findSolution());
            Explanation exp = cbj.getUserExplanation();
            Assert.assertEquals(2, exp.nbPropagators());
        }
    }
View Full Code Here

TOP

Related Classes of solver.explanations.Explanation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.