Example #1
0
[0&1] 1
[0&!1] 4
[!0&!1] 2&4
[!0&1] 1&2
State: 5
[t] 5
--END--"""

opts = spot.option_map()
opts.set('output', spot.OUTPUTLTL)
opts.set('tree_size_min', 15)
opts.set('tree_size_max', 15)
opts.set('seed', 0)
opts.set('simplification_level', 0)
spot.srand(0)
rg = spot.randltlgenerator(2, opts)

for a in produce_automaton(produce_phi(rg, 1000)):
    test_assert(a)
    test_assert(spot.dualize(a), spot.dualize(spot.dualize(a)))

aut = spot.automaton("""
HOA: v1
States: 1
Start: 0
AP: 1 "a"
Acceptance: 3 Fin(2) & (Inf(1) | Fin(0))
--BODY--
State: 0
--END--""")
test_complement(aut)
Example #2
0
try:
    spot.sum(aut1, aut2)
    exit(2)
except RuntimeError:
    pass


opts = spot.option_map()
opts.set('output', spot.OUTPUTLTL)
opts.set('tree_size_min', 15)
opts.set('tree_size_max', 15)
opts.set('wf', False)
opts.set('seed', 0)
opts.set('simplification_level', 0)
spot.srand(0)
rg = spot.randltlgenerator(2, opts)


dict = spot.make_bdd_dict()

def produce_phi(rg, n):
  phi = []
  while len(phi) < n:
    f = rg.next()
    if f.is_syntactic_persistence():
      phi.append(f)
  return phi

def equivalent(a, phi):
  negphi = spot.formula.Not(phi)
  nega   = spot.dualize(spot.tgba_determinize(a))
Example #3
0
# -*- mode: python; coding: utf-8 -*-
# Copyright (C) 2015 Laboratoire de Recherche et Développement de
# l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
#
# Spot is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# 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

o = spot.option_map()
g = spot.randltlgenerator(0, o)
assert str(g.next()) == '1'
assert str(g.next()) == '0'
assert str(g.next()) == 'None'