Пример #1
0
def solve_with_minisat():
    """
    Calls minisat with the specified formula, the number of variables
    and the number of clauses.
    Returns the output filename of the minisat computation.
    """
    logging.debug('Solving with %s' % MINISAT)
    if tools.command_available([MINISAT, INPUT, OUTPUT]):
        process = subprocess.Popen([MINISAT, INPUT, OUTPUT],
                                    stderr=subprocess.PIPE,
                                    stdout=subprocess.PIPE)
        process.wait()
    else:
        logging.error('Minisat could not be found.'
            'Please make sure the executable "%s" available on the path '
            '(e.g. /usr/bin).' % MINISAT)
        sys.exit(1)
    tools.remove(INPUT)
Пример #2
0
def validator_available():
    return tools.command_available(["validate", "-h"])
Пример #3
0
def minisat_available():
    return tools.command_available([MINISAT, '--help'])
Пример #4
0
def validator_available():
    return tools.command_available(['./validate', '-h'])
def validator_available():
    return tools.command_available(['validate', '-h'])
Пример #6
0
def minisat_available():
    return tools.command_available([MINISAT, '--help'])
Пример #7
0
def validator_available():
    """
    unmodified pyperplan function
    """
    return tools.command_available(['validate', '-h'])