(required_solvers, install_dir, bindings_dir, mirror_link)
Checks which solvers are visible to pySMT.
Checks which solvers are visible to pySMT.
Checks which solvers are visible to pySMT .
def check_installed(required_solvers, install_dir, bindings_dir, mirror_link):
    """Checks which solvers are visible to pySMT."""

    # Check which solvers are accessible from the Factory
    pypath_solvers = get_env().factory.all_solvers()

    global_solvers_status = []
    print("Installed Solvers:")
    for i in INSTALLERS:
        installer_ = i.InstallerClass(install_dir=install_dir,
                                      bindings_dir=bindings_dir,
                                      solver_version=i.version,
                                      mirror_link=mirror_link,
                                      **i.extra_params)
        solver = installer_.SOLVER
        version = installer_.get_installed_version()
        is_installed = (version is not None)
        global_solvers_status.append((solver, is_installed, version))
        del installer_

    for solver in required_solvers:
        if solver not in pypath_solvers:
            raise PysmtException("Was expecting to find %s installed" % solver)

    #
    # Output information
    #
    for (solver, is_installed, version) in global_solvers_status:
        msg = "  %s%s " % (solver.ljust(10), is_installed)
        msg += ("(%s)" % version).ljust(20)
        if solver not in pypath_solvers:
            msg += "Not in Python's path!"
        print(msg)
    print("")


    print("Solvers: %s" % ", ".join(name for name in pypath_solvers))
    qes = get_env().factory.all_quantifier_eliminators()
    print("Quantifier Eliminators: %s" % ", ".join(name for name in qes))

    ucs = get_env().factory.all_unsat_core_solvers()
    print("UNSAT-Cores: %s" % ", ".join(name for name in ucs))

    interps = get_env().factory.all_interpolators()
    print("Interpolators: %s" % ", ".join(name for name in interps))
def check_installed ( required_solvers , install_dir , bindings_dir , mirror_link ) : # Check which solvers are accessible from the Factory pypath_solvers = get_env ( ) . factory . all_solvers ( ) global_solvers_status = [ ] print ( "Installed Solvers:" ) for i in INSTALLERS : installer_ = i . InstallerClass ( install_dir = install_dir , bindings_dir = bindings_dir , solver_version = i . version , mirror_link = mirror_link , * * i . extra_params ) solver = installer_ . SOLVER version = installer_ . get_installed_version ( ) is_installed = ( version is not None ) global_solvers_status . append ( ( solver , is_installed , version ) ) del installer_ for solver in required_solvers : if solver not in pypath_solvers : raise PysmtException ( "Was expecting to find %s installed" % solver ) # # Output information # for ( solver , is_installed , version ) in global_solvers_status : msg = "  %s%s " % ( solver . ljust ( 10 ) , is_installed ) msg += ( "(%s)" % version ) . ljust ( 20 ) if solver not in pypath_solvers : msg += "Not in Python's path!" print ( msg ) print ( "" ) print ( "Solvers: %s" % ", " . join ( name for name in pypath_solvers ) ) qes = get_env ( ) . factory . all_quantifier_eliminators ( ) print ( "Quantifier Eliminators: %s" % ", " . join ( name for name in qes ) ) ucs = get_env ( ) . factory . all_unsat_core_solvers ( ) print ( "UNSAT-Cores: %s" % ", " . join ( name for name in ucs ) ) interps = get_env ( ) . factory . all_interpolators ( ) print ( "Interpolators: %s" % ", " . join ( name for name in interps ) )