sat_minimize: improve logs and document Python bindings
* spot/priv/satcommon.cc, spot/priv/satcommon.hh: Make it possible to set the log file without setting the environment variable. Adjust print_log to take the input state and print it as a new column. * spot/twaalgos/dtbasat.cc, spot/twaalgos/dtwasat.cc: Adjust all calls to print_log. Fix log output for incremental approaches. Prefer purge_unreachable_states() over stats_reachable(). Do not call scc_filter() on colored automata. * spot/twaalgos/dtwasat.hh: Document the new "log" option. * NEWS: Mention the changes. * tests/python/satmin.ipynb: New file. * tests/Makefile.am: Add it. * doc/org/satmin.org, doc/org/tut.org: Link to it. * doc/org/satmin.org, bin/man/spot-x.x: Adjust description of CSV files. * bench/dtgbasat/gen.py, bench/dtgbasat/tabl.pl, bench/dtgbasat/tabl1.pl, bench/dtgbasat/tabl2.pl, bench/dtgbasat/tabl3.pl, bench/dtgbasat/tabl4.pl: Adjust for the new column. * spot/misc/satsolver.cc, spot/misc/satsolver.hh (stats): Make it const. * python/spot/__init__.py (sat_minimize): Add display_log and return_log options. * tests/python/ipnbdoctest.py: Adjust to not compare SAT-minimization logs as they contain timings.
This commit is contained in:
parent
5266010889
commit
c766f58d5d
21 changed files with 5076 additions and 177 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (C) 2016, 2017 Laboratoire de Recherche et Développement de
|
||||
# Copyright (C) 2016-2018 Laboratoire de Recherche et Développement de
|
||||
# l'Epita (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
|
|
@ -272,7 +272,7 @@ def get_last_successful(n, category, pattern):
|
|||
+ '.satlog', 'r')
|
||||
log_csv = csv.reader(log)
|
||||
for line in log_csv:
|
||||
min_val = line[1]
|
||||
min_val = line[2]
|
||||
return '$\\le$' + min_val
|
||||
except Exception:
|
||||
return ''
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ sub getlastsuccesful($$)
|
|||
while (my $line = <LOG>)
|
||||
{
|
||||
my @f = split(/,/, $line);
|
||||
$min = $f[1] if $f[1] ne '';
|
||||
$min = $f[2] if $f[2] ne '';
|
||||
}
|
||||
$min = ", \$\\le\$$min" if $min ne "";
|
||||
return $min;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ sub getlastsuccesful($$)
|
|||
while (my $line = <LOG>)
|
||||
{
|
||||
my @f = split(/,/, $line);
|
||||
$min = $f[1] if $f[1] ne '';
|
||||
$min = $f[2] if $f[2] ne '';
|
||||
}
|
||||
$min = ", \$\\le\$$min" if $min ne "";
|
||||
return $min;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ sub getlastsuccesful($$)
|
|||
while (my $line = <LOG>)
|
||||
{
|
||||
my @f = split(/,/, $line);
|
||||
$min = $f[1] if $f[1] ne '';
|
||||
$min = $f[2] if $f[2] ne '';
|
||||
}
|
||||
$min = ", \$\\le\$$min" if $min ne "";
|
||||
return $min;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ sub getlastsuccesful($$)
|
|||
while (my $line = <LOG>)
|
||||
{
|
||||
my @f = split(/,/, $line);
|
||||
$min = $f[1] if $f[1] ne '';
|
||||
$min = $f[2] if $f[2] ne '';
|
||||
}
|
||||
$min = ", \$\\le\$$min" if $min ne "";
|
||||
return $min;
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ sub getlastsuccesful($$)
|
|||
while (my $line = <LOG>)
|
||||
{
|
||||
my @f = split(/,/, $line);
|
||||
$min = $f[1] if $f[1] ne '';
|
||||
$min = $f[2] if $f[2] ne '';
|
||||
}
|
||||
$min = ", \$\\le\$$min" if $min ne "";
|
||||
return $min;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue