python: improve handling of formulas

* src/misc/escape.hh, src/misc/escape.cc (escape_latex): New function.
* src/ltlvisit/tostring.cc: Escape atomic proposition in LaTeX output.
* wrap/python/spot.py: Make it easy to output formulas in different
syntaxes.  Also allow the AST to be shown.
* wrap/python/spot_impl.i: Catch std::runtime_error.
* wrap/python/tests/formulas.ipynb: New file.
* wrap/python/tests/Makefile.am: Add it.
This commit is contained in:
Alexandre Duret-Lutz 2015-03-11 19:41:24 +01:00
parent a6dbf5cf5e
commit 2362b9ab68
7 changed files with 667 additions and 35 deletions

View file

@ -1,7 +1,8 @@
## Copyright (C) 2010, 2012, 2013, 2014 Labortatoire de Recherche et Développement de
## l'EPITA.
## -*- coding: utf-8 -*-
## Copyright (C) 2010, 2012, 2013, 2014, 2015 Labortatoire de
## Recherche et Développement de l'EPITA.
## Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
## département Systèmes Répartis Coopératifs (SRC), Université Pierre
## département Systèmes Répartis Coopératifs (SRC), Université Pierre
## et Marie Curie.
##
## This file is part of Spot, a model checking library.
@ -32,6 +33,7 @@ check_SCRIPTS = run
TESTS = \
alarm.py \
bddnqueen.py \
formulas.ipynb \
implies.py \
interdep.py \
ltl2tgba.test \