dot: Add option @ to support aliases

Fixes #497.

* spot/twaalgos/dot.cc: Implement this option.
* tests/core/ltl2tgba.test, tests/core/randaut.test: @ is
now a valid option for --dot, use something else.
* tests/python/aliases.ipynb: New file.
* tests/Makefile.am, doc/org/tut.org: Add it.
* doc/org/hoa.org: Mention aliases.
* NEWS: Mention this new feature.
This commit is contained in:
Alexandre Duret-Lutz 2022-02-03 17:49:11 +01:00
parent 4506643632
commit 9b0a20412b
8 changed files with 1072 additions and 28 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2019 Laboratoire de Recherche et Développement de
# Copyright (C) 2009-2019, 2022 Laboratoire de Recherche et Développement de
# l'Epita (LRDE).
# Copyright (C) 2003-2004 Laboratoire d'Informatique de Paris 6
# (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
@ -230,8 +230,8 @@ for a in 'a1;a2' 'a1[*];a2[*]'; do
done
# test unknown dot options
ltl2tgba --dot=@ a 2>stderr && exit 1
grep 'ltl2tgba: unknown option.*@' stderr
ltl2tgba --dot='~' a 2>stderr && exit 1
grep 'ltl2tgba: unknown option.*~' stderr
# Make sure the count of AP is correct through never claims or LBTT
ltl2tgba -f a -s | autfilt -q --ap=1 --lbtt | autfilt -q --ap=1

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2014-2018, 2020 Laboratoire de Recherche et
# Copyright (C) 2014-2018, 2020, 2022 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -79,8 +79,8 @@ diff out expected
randaut -n 5 --stats='name: "%F-%L-%s-%c-%e"' a >out2
diff out2 expected
randaut -n 5 --dot=@ a 2>stderr && exit 1
grep 'randaut: unknown option.*@' stderr
randaut -n 5 --dot='~' a 2>stderr && exit 1
grep 'randaut: unknown option.*~' stderr
randaut -n -1 -Q2 2 -H | autfilt -H --is-deterministic -n 3 -o out.hoa
randaut -n -1 -Q2 2 -H | autfilt -H -v --is-deterministic -n 4 -o '>>out.hoa'