genem: implement the logic from the future journal version of ATVA19
This version of the generic emptiness-check, using smart selection and extraction of the Fin (implemented here via fin_one_extract), was suggested by Jan Strejček on 2020-06-26. * spot/twaalgos/genem.cc, spot/twaalgos/genem.hh: Add the spot210 variant. Also use it for the ACD use-case. * spot/twaalgos/zlktree.cc (zielonka_tree): Also use the same logic here. * tests/python/genem.py: Test the new version as well.
This commit is contained in:
parent
7fedb3dc61
commit
9539fbcf4c
4 changed files with 51 additions and 39 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# -*- mode: python; coding: utf-8 -*-
|
||||
# Copyright (C) 2018-2020 Laboratoire de Recherche et Développement de l'Epita
|
||||
# Copyright (C) 2018-2021 Laboratoire de Recherche et Développement de l'Epita
|
||||
# (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
|
|
@ -292,13 +292,16 @@ def run_bench(automata):
|
|||
res3b = spot.generic_emptiness_check(aut)
|
||||
spot.generic_emptiness_check_select_version("spot29")
|
||||
res3c = spot.generic_emptiness_check(aut)
|
||||
spot.generic_emptiness_check_select_version("spot210")
|
||||
res3d = spot.generic_emptiness_check(aut)
|
||||
res2 = spot.remove_fin(aut).is_empty()
|
||||
res1 = generic_emptiness2(aut)
|
||||
res = (str(res1)[0] + str(res2)[0] + str(res3a)[0]
|
||||
+ str(res3b)[0] + str(res3c)[0] + str(res4)[0] + str(res5)[0])
|
||||
+ str(res3b)[0] + str(res3c)[0] + str(res3d)[0]
|
||||
+ str(res4)[0] + str(res5)[0])
|
||||
print(res)
|
||||
assert res in ('TTTTTTT', 'FFFFFFF')
|
||||
if res == 'FFFFFFF':
|
||||
assert res in ('TTTTTTTT', 'FFFFFFFF')
|
||||
if res == 'FFFFFFFF':
|
||||
run3 = spot.generic_accepting_run(aut)
|
||||
assert run3.replay(spot.get_cout()) is True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue