Ejemplo n.º 1
0
        output = 5
    else:
        usage(prog)

if len(args) != 1:
    usage(prog)


cout = spot.get_cout()
cerr = spot.get_cerr()

e = spot.default_environment.instance()
p = spot.empty_parse_error_list()

f = spot.parse(args[0], p, e, debug_opt)
if spot.format_parse_errors(cerr, args[0], p):
    exit_code = 1

dict = spot.bdd_dict()

if f:
    if fm_opt:
        a = spot.ltl_to_tgba_fm(f, dict)
        concrete = 0
    else:
        a = concrete = spot.ltl_to_tgba_lacim(f, dict)
    f.destroy()
    del f

    degeneralized = None
    if degeneralize_opt:
Ejemplo n.º 2
0
# You should have received a copy of the GNU General Public License
# along with Spot; see the file COPYING.  If not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.

import sys
import spot

e = spot.default_environment.instance()
p = spot.empty_parse_error_list()

l = ['GFa', 'a U (((b)) xor c)', '!(FFx <=> Fx)', 'a \/ a \/ b \/ a \/ a'];

for str1 in l:
    f = spot.parse(str1, p, e, 0)
    if spot.format_parse_errors(spot.get_cout(), str1, p):
        sys.exit(1)
    str2 = str(f)
    f.destroy()
    print str2
    # Try to reparse the stringified formula
    f = spot.parse(str2, p, e)
    if spot.format_parse_errors(spot.get_cout(), str2, p):
        sys.exit(1)
    print f
    f.destroy()

assert spot.atomic_prop.instance_count() == 0
assert spot.binop.instance_count() == 0
assert spot.unop.instance_count() == 0
assert spot.multop.instance_count() == 0
Ejemplo n.º 3
0
# You should have received a copy of the GNU General Public License
# along with Spot; see the file COPYING.  If not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.

import sys
import spot

e = spot.default_environment.instance()
p = spot.empty_parse_error_list()

l = ['GFa', 'a U (((b)) xor c)', '!(FFx <=> Fx)', 'a \/ a \/ b \/ a \/ a']

for str1 in l:
    f = spot.parse(str1, p, e, 0)
    if spot.format_parse_errors(spot.get_cout(), str1, p):
        sys.exit(1)
    str2 = str(f)
    f.destroy()
    print str2
    # Try to reparse the stringified formula
    f = spot.parse(str2, p, e)
    if spot.format_parse_errors(spot.get_cout(), str2, p):
        sys.exit(1)
    print f
    f.destroy()

assert spot.atomic_prop.instance_count() == 0
assert spot.binop.instance_count() == 0
assert spot.unop.instance_count() == 0
assert spot.multop.instance_count() == 0
Ejemplo n.º 4
0
        output = 5
    else:
        usage(prog)

if len(args) != 1:
    usage(prog)


cout = spot.get_cout()
cerr = spot.get_cerr()

e = spot.default_environment.instance()
p = spot.empty_parse_error_list()

f = spot.parse(args[0], p, e, debug_opt)
if spot.format_parse_errors(cerr, args[0], p):
    exit_code = 1

dict = spot.bdd_dict()

if f:
    if fm_opt:
        a = spot.ltl_to_tgba_fm(f, dict)
        concrete = 0
    else:
        a = concrete = spot.ltl_to_tgba_lacim(f, dict)
    f.destroy()
    del f

    degeneralized = None
    if degeneralize_opt: