bool ast::is_taut(z3::solver& solver, const z3::expr& expr) {
	solver.push();
	solver.add(!expr);
	auto res = solver.check();
	solver.pop();
	return res == z3::unsat;
}
Beispiel #2
0
    void addConstraintsToSolver(z3::solver &solver)
    {
        std::vector<z3::expr*>::iterator it;

        for (it = _inputNodes.begin(); it != _inputNodes.end(); ++it)
            {
                (*it)->simplify();
                solver.add(*(*it));
            }
        for (it = _outputNodes.begin(); it != _outputNodes.end(); ++it)
            {
                (*it)->simplify();
                solver.add(*(*it));
            }
        // FIXME : remove because not a condition
        // for (it = _hiddenNodes.begin(); it != _hiddenNodes.end(); ++it)
        //     solver.add(*(*it));
    }