import cuter_io as cIO import cuter_z3 as cz3 import cuter_smt as cSMT import cuter_logger as clg import cuter_common as cc ## Parse the arguments. parser = argparse.ArgumentParser(description="Run the Solver Component.") parser.add_argument("-s", "--smt", action='store_true', help="use the SMTv2 backend") args = parser.parse_args() ## Main Program cglb.init() # Initialize the communication with Erlang erlport = cp.ErlangPort() # Initialize the Solver interface erlSolver = cz3.ErlangZ3() if not args.smt else cSMT.ErlangSMT() try: while cglb.__RUN__: data = erlport.receive() clg.data_received(data) cmd = cp.decode_command(erlport, erlSolver, data) clg.clean_empty_logs() except: e = traceback.format_exc() erlport.send(e)
import cuter_smt as cSMT import cuter_logger as clg import cuter_common as cc ## Parse the arguments. parser = argparse.ArgumentParser(description="Run the Solver Component.") parser.add_argument("-s", "--smt", action='store_true', help="use the SMTv2 backend") parser.add_argument("-t", "--timeout", metavar="N", type=int, default=2, help="set the timeout N for the SMT solver (default: %(default)s)") args = parser.parse_args() ## Main Program cglb.init() # Initialize the communication with Erlang erlport = cp.ErlangPort() # Initialize the Solver interface erlSolver = cz3.ErlangZ3() if not args.smt else cSMT.ErlangSMT(args.timeout) try: while cglb.__RUN__: data = erlport.receive() clg.data_received(data) cmd = cp.decode_command(erlport, erlSolver, data) clg.clean_empty_logs() except: e = traceback.format_exc() erlport.send(e)
#!/usr/bin/env python # -*- coding: utf-8 -*- import traceback import cuter_global as cglb import cuter_port as cp import cuter_io as cIO import cuter_z3 as cz3 import cuter_logger as clg import cuter_common as cc ## Main Program cglb.init() erlport = cp.ErlangPort() # Initialize the communication with Erlang erlz3 = cz3.ErlangZ3() # Initialize the Z3 interface try: while cglb.__RUN__: data = erlport.receive() clg.data_received(data) cmd = cp.decode_command(erlport, erlz3, data) clg.clean_empty_logs() except: e = traceback.format_exc() erlport.send(e)
#!/usr/bin/env python # -*- coding: utf-8 -*- import traceback import cuter_global as cglb import cuter_port as cp import cuter_io as cIO import cuter_z3 as cz3 import cuter_common as cc ## Main Program cglb.init() erlport = cp.ErlangPort() # Initialize the communication with Erlang erlz3 = cz3.ErlangZ3() # Initialize the Z3 interface try: while cglb.__RUN__: data = erlport.receive() erlport.send(str(data)) # Just print back the command cmd = cp.decode_command(erlport, erlz3, data) except: e = traceback.format_exc() erlport.send(e)