cex: provide the user with a means to change the timeout

Reported by Frank Heckenbach.
https://lists.gnu.org/r/bug-bison/2022-07/msg00011.html

* bootstrap.conf: Use c_strtod, so that even in French locales "1.5"
is accepted, instead of "1,5".
* src/counterexample.c, src/state-item.c: Use xtime_t instead of
time_t, so that accuracy goes from seconds to nanoseconds.
( counterexample_init): Depend on cex.timeout rather than
$TIME_LIMIT.
* doc/bison.texi (%define Summary): Document cex.timeout.
This commit is contained in:
Akim Demaille
2022-09-13 08:25:59 +02:00
parent 15b97a0a6a
commit c025891547
9 changed files with 48 additions and 18 deletions

View File

@@ -22,6 +22,7 @@
#include "state-item.h"
#include <assert.h>
#include <gethrxtime.h>
#include <gl_linked_list.h>
#include <gl_xlist.h>
#include <stdlib.h>
@@ -533,7 +534,7 @@ state_items_report (FILE *out)
void
state_items_init (void)
{
time_t start = time (NULL);
xtime_t start = gethrxtime ();
init_state_items ();
init_trans ();
init_prods ();
@@ -542,7 +543,7 @@ state_items_init (void)
prune_disabled_paths ();
if (trace_flag & trace_cex)
{
fprintf (stderr, "init: %f\n", difftime (time (NULL), start));
fprintf (stderr, "state_items_init: %.3fs\n", (gethrxtime () - start) / 1e9);
state_items_report (stderr);
}
}