Exemple #1
0
 def transform_acc(self, acc, new_acc_num):
     if acc == spot.mark_t([0]):
         return spot.mark_t([new_acc_num])
     elif acc == spot.mark_t([]):
         return spot.mark_t([])
     else:
         raise Exception(
             'Unexpected acceptance condition on edge: {}'.format(e.acc))
Exemple #2
0
    spot.gf_guarantee_to_ba(f, spot._bdd_dict)
except RuntimeError as e:
    assert "guarantee" in str(e)
else:
    report_missing_exception()

f = spot.formula('FG(a | Fb)')
try:
    spot.fg_safety_to_dca(f, spot._bdd_dict)
except RuntimeError as e:
    assert "safety" in str(e)
else:
    report_missing_exception()

n = spot.mark_t.max_accsets()
m = spot.mark_t([n - 1])
try:
    m = spot.mark_t([0]) << n
except RuntimeError as e:
    assert "Too many acceptance sets" in str(e)
else:
    report_missing_exception()

try:
    m.set(n)
except RuntimeError as e:
    assert "bit index is out of bounds" in str(e)
else:
    report_missing_exception()

try:
Exemple #3
0
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Spot is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

import spot

a = spot.vector_rs_pair()

m0 = spot.mark_t([0])
m1 = spot.mark_t([1])
m2 = spot.mark_t([2])
m3 = spot.mark_t([3])
mall = spot.mark_t()


def test_rs(acc, rs, expected_res, expected_pairs):
    res, p = getattr(acc, 'is_' + rs + '_like')()
    assert res == expected_res
    if expected_res:
        expected_pairs.sort()
        p = sorted(p)
        for a, b in zip(p, expected_pairs):
            assert a.fin == b.fin and a.inf == b.inf