Beispiel #1
0
void
cndfs_local_deinit   (run_t *run, wctx_t *ctx)
{
    cndfs_alg_local_t  *cloc = (cndfs_alg_local_t *) ctx->local;

    if (run->shared->rec != NULL) {
        alg_local_deinit (run->shared->rec, ctx->global->rec);
        wctx_deinit (ctx->global->rec); // see cndfs_local_init
    }

    dfs_stack_destroy (cloc->in_stack);
    dfs_stack_destroy (cloc->out_stack);
    RTdeleteTimer (cloc->timer);
    fset_free (cloc->pink);
    ndfs_local_deinit (run, ctx);
}
Beispiel #2
0
void
final_stat_reporting(vset_t visited)
{
    RTprintTimer(info, reach_timer, "reachability took");

    if (dlk_detect) Warning(info, "No deadlocks found");

    if (act_detect != NULL) {
        Warning(info, "%d different actions with prefix \"%s\" are found", ErrorActions, act_detect);
    }

    long n_count;
    Print(infoShort, "counting visited states...");
    rt_timer_t t = RTcreateTimer();
    RTstartTimer(t);
    char states[128];
    long double e_count;
    int digs = vset_count_fn(visited, &n_count, &e_count);
    snprintf(states, 128, "%.*Lg", digs, e_count);

    RTstopTimer(t);
    RTprintTimer(infoShort, t, "counting took");
    RTresetTimer(t);

    int is_precise = strstr(states, "e") == NULL && strstr(states, "inf") == NULL;

    Print(infoShort, "state space has%s %s states, %ld nodes", precise && is_precise ? " precisely" : "", states, n_count);

    if (!is_precise && precise) {
        if (vdom_supports_precise_counting(domain)) {
            Print(infoShort, "counting visited states precisely...");
            RTstartTimer(t);
            bn_int_t e_count;
            vset_count_precise(visited, n_count, &e_count);
            RTstopTimer(t);
            RTprintTimer(infoShort, t, "counting took");

            size_t len = bn_strlen(&e_count);
            char e_str[len];
            bn_int2string(e_str, len, &e_count);
            bn_clear(&e_count);

            Print(infoShort, "state space has precisely %s states (%zu digits)", e_str, strlen(e_str));
        } else Warning(info, "vset implementation does not support precise counting");
    }


    RTdeleteTimer(t);

    if (log_active (infoLong) || peak_nodes) {
        log_t l;
        if (peak_nodes) l = info;
        else l = infoLong;
        if (max_lev_count == 0) {
            Print(l, "( %ld final BDD nodes; %ld peak nodes )", n_count, max_vis_count);
        } else {
            Print(l,
                  "( %ld final BDD nodes; %ld peak nodes; %ld peak nodes per level )",
                  n_count, max_vis_count, max_lev_count);
        }

        if (log_active (debug)) {
            Debug("( peak transition cache: %ld nodes; peak group explored: " "%ld nodes )\n",
                  max_trans_count, max_grp_count);
        }
    }
}
Beispiel #3
0
/**
 * \brief Destroy options object
 */
void spg_destroy_solver_options(spgsolver_options* options)
{
    RTdeleteTimer(options->attr_options->timer);
    RTfree(options->attr_options);
    RTfree(options);
}