fix eventual/universal properties for ->/<->/xor

* spot/tl/formula.cc: Correctly set eventual and universal properties
for ->, <->, and xor.  This wasn't really relevant before, but there
are now situation where those are not rewritten.
* tests/core/kind.test: Adjust expected output.
* tests/core/ltl2tgba2.test: New test case, reported by Florian
Renkin.
* NEWS: Mention the bug.
This commit is contained in:
Alexandre Duret-Lutz 2021-02-03 12:20:42 +01:00
parent 93d8f43285
commit c06e15e085
4 changed files with 24 additions and 10 deletions

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2015-2019 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2015-2019, 2021 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -1283,8 +1283,8 @@ namespace spot
case op::Xor:
case op::Equiv:
props = children[0]->props & children[1]->props;
is_.eventual = false;
is_.universal = false;
// Preserve suspendable property
is_.eventual = is_.universal = is_.eventual && is_.universal;
is_.sere_formula = is_.boolean;
is_.sugar_free_boolean = false;
is_.in_nenoform = false;
@ -1310,8 +1310,10 @@ namespace spot
break;
case op::Implies:
props = children[0]->props & children[1]->props;
is_.eventual = false;
is_.universal = false;
is_.eventual =
children[0]->is_universal() && children[1]->is_eventual();
is_.universal =
children[0]->is_eventual() && children[1]->is_universal();
is_.sere_formula = (children[0]->is_boolean()
&& children[1]->is_sere_formula());
is_.sugar_free_boolean = false;