X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fmodel-checker.h;h=be97d389bcc7219c8dd325e02900f829b2082077;hb=03384f9680feba65ee79b9680f366435a7a60442;hp=1e756119f5b7175860615f6a44938d5e75e6c08b;hpb=72f4ef01cee853fd8e5bca96afad06397326ec76;p=pspp diff --git a/src/libpspp/model-checker.h b/src/libpspp/model-checker.h index 1e756119f5..be97d389bc 100644 --- a/src/libpspp/model-checker.h +++ b/src/libpspp/model-checker.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2007, 2009 Free Software Foundation, Inc. + Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -150,14 +150,12 @@ mc_name_operation (mc, "do operation %s", ...); clone = clone_foo (state); do_operation (clone); - if (!mc_discard_dup_state (mc, hash_foo (clone))) - { - if (!state_is_consistent (clone)) - mc_error (mc, "inconsistent state"); - mc_add_state (mc, clone); - } - else + if (!state_is_consistent (clone)) + mc_error (mc, "inconsistent state"); + if (mc_discard_dup_state (mc, hash_foo (clone))) destroy_foo (clone); + else + mc_add_state (mc, clone); } } @@ -204,10 +202,10 @@ the metadata. mc_discard_dup_state may be called before or after - checking for consistency, but calling it first avoids - wasting time checking duplicate states for - consistency, which again can be a significant - performance boost. + checking for consistency. Calling it after checking + may make checking a given number of unique states + take longer, but it also ensures that all paths to a + given state produce correct results. - The mc_error function reports errors. It may be called as many times as desired to report each kind @@ -300,7 +298,7 @@ #include #include -#include +#include "libpspp/compiler.h" /* An active model checking run. */ struct mc; @@ -429,6 +427,11 @@ void mc_options_set_progress_func (struct mc_options *, mc_progress_func *); void *mc_options_get_aux (const struct mc_options *); void mc_options_set_aux (struct mc_options *, void *aux); + +struct argv_parser; +void mc_options_register_argv_parser (struct mc_options *, + struct argv_parser *); +void mc_options_usage (void); /* Reason that a model checking run terminated. */ enum mc_stop_reason