spot/doc/org/tut.org
Alexandre Duret-Lutz c766f58d5d 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.
2018-03-30 18:01:59 +02:00

5.3 KiB

Code Examples

This section contains code examples for using Spot. This is a work in progress. Feel free to send suggestions of small tasks you would like to see illustrated here.

If you have difficulties compiling the C++ examples, check out these instructions.

Reading the concepts page might help if you are not familiar with some of the objects manipulated here.

Examples in Python only

In directory python/tests, the Spot tarball contains a small collection of IPython notebooks. As the name of the directory implies, these are part of the test suite for the Python bindings, however they can be interesting to look at if you want to see more code examples.

For convenience, the following links offer static HTML renderings of these notebooks, but we strongly suggest interactively evaluating the real notebooks instead.