/**Function******************************************************************** Synopsis [Tries to solve formulas in groups belonging to the solver except the groups in the list.] Description [The permanent group must not be in the list. Returns a flag whether the solving was successful. If it was successful only then SatSolver_get_model may be invoked to obtain the model ] SideEffects [] SeeAlso [SatSolverResult,SatSolver_get_permanent_group, SatIncSolver_create_group, SatSolver_get_model] ******************************************************************************/ SatSolverResult SatIncSolver_solve_without_groups(const SatIncSolver_ptr self, const Olist_ptr groups) { SatSolverResult result; SAT_INC_SOLVER_CHECK_INSTANCE(self); if ((Slist_ptr)NULL != SAT_SOLVER(self)->model) { Slist_destroy(SAT_SOLVER(self)->model); /* destroy the model of previous solving */ } SAT_SOLVER(self)->model = (Slist_ptr)NULL; if (opt_verbose_level_gt(OptsHandler_get_instance(), 0)) { fprintf(nusmv_stderr, "Invoking solver '%s'...\n", SatSolver_get_name(SAT_SOLVER(self))); } SAT_SOLVER(self)->solvingTime = util_cpu_time(); result = self->solve_without_groups(self, groups); SAT_SOLVER(self)->solvingTime = util_cpu_time() - SAT_SOLVER(self)->solvingTime; if (opt_verbose_level_gt(OptsHandler_get_instance(), 0)) { fprintf(nusmv_stderr, "Solver '%s' returned after %f secs \n", SatSolver_get_name(SAT_SOLVER(self)), SatSolver_get_last_solving_time(SAT_SOLVER(self))/1000.0); } return result; }
void Be_Cnf_Delete(Be_Cnf_ptr self) { nusmv_assert(self != NULL); Slist_destroy_and_free_elements(self->cnfClauses, _be_cnf_destroy_clause); Slist_destroy(self->cnfVars); FREE(self); }